Find all the missing paths in the PATH variable in bash script
Here is a simple script that will list out all the paths in the PATH variable that do not exist.
|
1
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
Here is a simple script that will list out all the paths in the PATH variable that do not exist.
|
1
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
Some errors are too good and though you would have seen them couple of times you don’t realize until sometimes it just hits you, like the one below:
tar: Cowardly refusing to create an empty archive
Recently I encountered a problem where I had to create couple of arrays in bash and these were quite dynamic in nature. This script was supposed to be used by couple of guys whom I did not trust too much in opening the script and modifyikng the array. So, the solution was to put these in different files and then put them in array using bash script itself. This is when I went through the bash man page again and found an interesting new inbuilt mapfile
Continue readingSome days back, I had to generate some data to be uploaded to a database. As usual I assumed that bash should be faster and hence wrote the script to create the files in bash. But I found that even after 5 hours I was only 10% done with the data generation. Now that would mean that it would take around 50 hours to complete the data generation. Something did not look correct to me and I asked one of my colleague. He suggested I do a strace.
Continue readingOn Desktop on Gnome using nautilus, now you can resize individual icons. Just right click on the icon to resize and in the menu you will get a resize icon :
][1]and then you can resize the icon from the borders:
][2]Speed Up Firefox by Moving Your Cache to RAM, No RAM Disk Required [Firefox Tip] Click here to read Speed Up Firefox by Moving Your Cache to RAM, No RAM Disk Required We’ved talked about moving your cache files to a RAM disk to speed things up, but it turns out Firefox has this feature built in. Here’s how to turn it on. More »
Continue readingHere are some links for bash programming that you may find useful.
http://tips-linux.net/en/content/pro-bash-programming
http://tips-linux.net/en/content/expert-shell-scripting
http://tips-linux.net/en/content/beginning-linux-command-line
http://tips-linux.net/en/content/bash-pocket-reference
http://tips-linux.net/en/content/linux-command-line-and-shell-scripting-bible