I found out that when I want to create some shell script or advanced command it always made me trouble to remember the names of the commands and their switches.
e.g.
tr -d '\n' < file | wc -c
Though in programming languages I could write something like
len(replace(str(file), "\n", ""))
Which is more memorable and there is less probability to search in man pages and it's more understandable for others.
So, why shell scripting is for so many years in this cryptic form? Is their an effort to change the syntax to be clear what the code does without a lot of man pages studying? Are there some advantages of this form? How can we cope with the disadvantages to get most from the shell scripting?
str()
do above? Is it supposed to read the contents of the filename stored in variablefile
? If so, it's not a well-named function. – glenn jackman Apr 12 '12 at 13:14