Originally Posted by shayne391
Thanks, as I am new to Linux. A place to start is all I ask. I never want a hand out only a hand up and you have given it to me. Now that I know where to start I am no longer overwhelmed.
I understand which is why I worked so hard on crafting an answer for you. If I thought all you wanted was a simple script I wouldn't have bothered. I just wanted to convey the general attitude of this community because the framing of your question looked a lot like elementary "introduction to Linux" course work college students generally sludge through. Often, students come here expecting to be handed answers without effort on their own part and then label the community useless when their expectations are not met.
I'm not categorizing you with that. I'm just stating where my original mentality stemmed.
Also, the find utility is occasionally used to solve a problem like this as well. Both name globbing in a for loop and the find utility generally work.
for x in *.dat;do
find . -type f -name '*.dat' | while read line;do
Definitely use the man pages. Almost every utility ever comes with a man page. There's even a man page for the man command.
Learn the navigation shortcuts because man pages (such as man bash) can be very large.
Unrelated but also a valuable resource: You should also check out IRC. That's just another place to get help on any subject involving Linux or programming. See freenode.net for that. There's a #bash channel on freenode.