Tag: linux resources
-
Why doesn’t bash script recognize aliases
Here I won’t be doing much explaining, just listing links so people can read about this befuddling issue. It often boggles my mind how differently you must write shell scripts vs the command line commands. It is often very inconsistent, I hate inconsistencies. Basically Aliases within Linux shell are not recognized without some fancy hacky…
-
Bash how write large amounts of text to a file
I searched and tried for days to find the answer to this. All I wanted to do was be able to basically create a file and write text to it exactly as I had entered it in a shell script. Every suggestion on the internet was fubar. Note : to run these commands, put them…
-
How to make linux shell scripts wait for a command to finish before running another
I am writing this so when other people google how to do it, they have something to find to save them time. For days I tried to figure out how to make sure a command finished before another was run. I couldn’t find any information anywhere. If you are like me you may be thinking…
-
What does a dollar sign followed by a square bracket $[…] mean in bash?
I saw something similar to this in some code in one of my books var=$[ $var1 – $var2 ] I wanted to know what it did and why it was used. I’m a perfectionist with OCD. Turns out it is deprecated from the BASH language. Originally $[] was used to do math in Bash scripts…
-
Linux bash scripting command substitution aka $(command)
Linux has this syntax that looks like so: $(command) This is called command substitution. This allows you to get information about the execution of the command instead of having it it directed to STDOUT aka the terminal screen as usual. That is very useful actually because you can run a command and store the output…
-
Debian Ubuntu Linux debconf resources and information
The debconf programmers tutorial – excellent tutorial on what debconf is and how to use it. debconf documentation Using debconf to configure a system – article about using debconf, gives a little more explanation of what it is. Installing MySQL with debconf – good article
-
Linux xclip command makes command line life easier
I discovered a new tool today while adding my ssh keys to Github, something called xclip. The xclip command makes it easy to capture output to the clipboard so you can paste it to another location like into a browser or word file etc. The github docs above have you use it to copy your…
-
Linux how to copy files from one directory to another without copying the directory name
This is for later when I forget how to do this. Basically I wanted to know how to move files from one directory into another recursively without the cp command also copying the directory name. Basically if you use cp -r /directory then the contents of the directory and all within are copied, but this…