I often find Bash syntax very helpful, e.g. process substitution like in diff <(sort file1) <(sort file2). Is it possible to use such Bash commands in a Makefile? I’m...
Is there any bash command that will let you get the nth line of STDOUT? That is to say, something that would take this $ ls -l -rw-r--r--@ 1...
I have an archive, which is archived by someone else, and I want to automatically, after I download it, to change a branch of the file system within the...
I would like to define some aliases in fish. Apparently it should be possible to define them in ~/.config/fish/functions but they don’t get auto loaded when I restart the...
Should or should I not wrap quotes around variables in a shell script? For example, is the following correct: xdg-open $URL [ $? -eq 2 ] or xdg-open "$URL"...
Is it possible to redirect all of the output of a Bourne shell script to somewhere, but with shell commands inside the script itself? Redirecting the output of a...
I have a variable which contains a space-delimited string: line="1 1.50 string" I want to split that string with space as a delimiter and store the result in an...
Looking for a command that will return the single most recent file in a directory. Not seeing a limit parameter to ls… 21 Answers 21
I was helped out today with a command, but it doesn’t seem to be working. This is the command: find /home/me/download/ -type f -name "*.rm" -exec ffmpeg -i {}...
I want to transform /foo/bar/.. to /foo Is there a bash command which does this? Edit: in my practical case, the directory does exist. 24 Answers 24