My dad is a retired computer scientist. He started programming in the
mid fifties. This was before computers as we know them today and
before languages.
I had an excellent opportunity to get training from one of the best.
And he was more than happy to train. His skill with math is so
advanced, he can put me to sleep just talking about.
Seeing what it is like to have a real pro with C was too intimidating to
me. Do to loss of confidence, I didn't peruse programming the way I
originally intended. But with the interest I had in computers, I kept
right on writing programs within my skill level, fixing, building,
modifying and everything imaginable. And of course learning and
gaining experience.
About sed
Sed is not bash. It is a stream editor. A utility found in all our Linux
distros. I never took the time to learn it well. Lately I've been
working more with it. I thank Shep for his help, encouragement and
expertise.
I went back a few pages in this topic to study a line he posted. I
couldn't follow it. Back again to that feeling of losing of confidence.
Here is the line.
Code: Select all
ls *.mp3 | sed "h; s/['"'()]//g; :a; s/[ \.]\(.*\.\)/_\1/; ta; x; G; s/\(.*\)\n/mv "\1" /' | sh
While I still can't following the line, I've learned enough to not lose the
confidence.
This is more simple than it looks. Just break it down into small pieces.
So the first part I don't understand is the first letter.
If I want to figure it out, I merely need to find a good sed page and
find out what h; means. The next full command I do understand. If I
want to train myself on it merely copy it to the screen and play with
some combinations. Just keep moving through.
Also people like Shep and myself are happy to explain things in
sufficient detail, the learning curve is easier.
Don't quit, or lose confidence. A big script like the kind Barry writes,
when taken as a whole is too much to digest. In fact you can't see
many of his scripts in one or even 10 pages. Primarily, you need to
break things down into small pieces.
A problem I have working with his scripts is keeping track of what
data various VARIABLES might contain. I can figure it out and add
comments so I don't have to wonder.
~