Tag: Terminal

Bash: Dynamically named variables

Sometimes you want to run a series of commands that are slightly different, but for each command the arguments must also be slightly different. Say, for example, you have a script that runs multiple other commands and you want to give each one a temporary file to put its results in, then combine these at …

Linux Terminal: Removing/Changing newlines without using a text editor

In the interests of automation, I wanted to be able to convert the output of a command (In this case “ls”) into a format that can be read by another program. To do this I had to replace the newline characters in the command’s output with the pipe character (“|”). Now, I couldĀ do this with …