>>>>> "Jan" == Jan L Peterson <[email protected]> writes:
Jan> (eval `ls -1 *.meta | while read m; do f=\`grep "^Filter:" $m | awk
'{print $2; exit}'\`; echo -n "./$f -r \`basename $m .meta\` |"; done | sed -e
"s/|$//"`) < input > output
Jan> which gets rid of the multiple "cut" commands, "head", one of the
Jan> nested loops, and both gratuitous uses of "cat".
But still leaves the evil of "ls *wild*card*", which is almost always
wrong, unless what you're trying to do is get the contents of many
subdirectories whose name matches a pattern.
{sigh}
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[email protected]> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
_______________________________________________
Discuss mailing list
[email protected]
https://lists.lopsa.org/cgi-bin/mailman/listinfo/discuss
This list provided by the League of Professional System Administrators
http://lopsa.org/