Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

bash

How to execute consecutive commands from history?

August 10, 2022 by Magenaut

Suppose I want to execute a sequence of four commands that I have executed before. If the first one is 432 in the command-history, then I could do:

Categories Q&A, Unix & Linux Tags bash, command-history, command-line Leave a comment

Daemonize a process in shell?

August 10, 2022 by Magenaut

http://linuxg.net/how-to-transform-a-process-into-a-daemon-in-linux-unix/ gives an example of daemonizing a process in bash:

Categories Q&A, Unix & Linux Tags bash, daemon, linux Leave a comment

Find out what scripts are being run by bash at login

August 10, 2022 by Magenaut

After starting a bash terminal, I noticed that the PATH variable contains duplicate entries. My terminal starts a login shell, so ~/.bash_profile is sourced, followed by ~/.profile and ~/.bashrc. Only in ~/.profile do I create the paths entries which are duplicated.

Categories Q&A, Unix & Linux Tags bash, profile Leave a comment

What is a fast command line way to switch between multiple directories for system administration?

August 10, 2022 by Magenaut

What is a fast command line way to switch between multiple directories for system administration? I mean, I can use pushd . and popd to toggle, but what if I want to store multiples and cycle through them, rather than permanently popping them off the bottom of the stack?

Categories Q&A, Unix & Linux Tags administration, bash, shell-script Leave a comment

Piping STDERR vs. STDOUT

August 10, 2022 by Magenaut

According to “Linux: The Complete Reference 6th Edition” (pg. 44), you can pipe only STDERR using the |& redirection symbols.

Categories Q&A, Unix & Linux Tags bash, io-redirection, pipe Leave a comment

How to make a variable from a subshell available in the parent shell

August 10, 2022 by Magenaut

I’ve written a quick-and-dirty script to time some reports from a web service:

Categories Q&A, Unix & Linux Tags bash, io-redirection, shell, subshell Leave a comment

How to debug and fix slow autocomplete in bash?

August 10, 2022 by Magenaut

After a recent update (Ubuntu 12.04 LTS), TAB complete on the command line is slow. After entering a partial command (e.g evi [TAB]) or partial filename (e.g. evince somedocu[TAB]) the shell, sometimes though not always, hangs for several seconds.

Categories Q&A, Unix & Linux Tags autocomplete, bash Leave a comment

Forward SIGTERM to child in Bash

August 10, 2022 by Magenaut

I have a Bash script, which looks similar to this:

Categories Q&A, Unix & Linux Tags bash, docker, shell, signals Leave a comment

How to properly escape exclamation points in bash?

August 10, 2022 by Magenaut

Today, I was caught redhanded while attempting to code golf a password generator for Twitter.

Categories Q&A, Unix & Linux Tags bash, command-history, quoting Leave a comment

How to read first and last line from cat output?

August 10, 2022 by Magenaut

I have text file. Task – get first and last line from file after

Categories Q&A, Unix & Linux Tags awk, bash, grep, sed, shell Leave a comment
Older posts
Newer posts
← Previous Page1 … Page10 Page11 Page12 … Page65 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress