Problems? Is your data what you think it is? | |
PerlMonks |
Re: Bash script to perl scriptby hippo (Bishop) |
on Jun 18, 2016 at 12:19 UTC ( [id://1166036]=note: print w/replies, xml ) | Need Help?? |
Since there are a lot of files so it is hard to do manually using bash for each file. Bash answer: use a loop. Perl has a steep learning curve, and I encourage you to follow the references in the other replies. Perl is much, much more flexible powerful and efficient than bash (or any other shell) in most circumstances and the time spent learning it will pay huge dividends. But, if you just want a quick solution you can look to use the tools with which you are already familiar. One other top tip: never* pipe grep into awk, it's a waste of a process. Instead of your grep above you can do
*Well, almost never. There are exceptions to every rule after all.
In Section
Seekers of Perl Wisdom
|
|