shell-script
How to get the last argument to a /bin/sh function
What’s a better way to implement print_last_arg?
Can I use a variable in a Bash brace expansion?
Below is some sort of pseudo-code for what I’m trying to accomplish:
Add thousands separator in a number
In python
How do I redirect command output to a file?
I have a command that I run in a folder that outputs MD5 hashes and filenames on the terminal:
Why doesn’t “sudo su” in a shell script run the rest of the script as root?
A sample script can be as below:
vim: create file with +x bit
Is there any way to set +x bit on script while creating?
Print Matching line and nth line from the matched line
I am trying to print the matched line and the 4th line from the matched line (line containing the expression I am searching for).
Bash: calculate the time elapsed between two timestamps
I have written a script that notifies me when a value is not within a given range. All values “out of range” are logged in a set of per day files.
Why cat, grep and other commands can’t understand files starting with minus sign?
If I have a file which name starting with single or several minus sign, for example –1 it can’t be used as a parameter of many commands. Even if I run cat –1 instead of file content I get unrecognised option error message: cat: unrecognized option '–1' Same effect appears when I type cat "–1" … Read more