Tag Archives: bash

bash: Redirect all STDIN to a file

Hi,

to simply redirect all incoming input from STDIN to a file you can use less.
Continue reading bash: Redirect all STDIN to a file

Linux: Change working directory to script directory in bash

Hi,

short post. You start a bash script and want to change the working directory to the directory where the script is stored

Use this:

cd "$(dirname "$0")"

Michael

Linux: Move a process from fore- to background

Hi,

bash offers the ability to move a running foreground process into background.

An example 🙂 Listen with netcat at tcp port 80, this process to not exit and stays in foreground.

root@debdev:~# nc -l -t -p 80 -s 10.254.1.1

Now I want to do some other things in this console.
Continue reading Linux: Move a process from fore- to background