Results 1 to 3 of 3
Could someone help me in shortening the following bash script to one command without piping.
Code:
for i in `ls -la | awk '{print $9}' | grep -v lvx-frotix-pcs`; do ...
- 06-08-2011 #1Just Joined!
- Join Date
- Jun 2011
- Posts
- 1
Pls shorten the following code
Could someone help me in shortening the following bash script to one command without piping.
It would help me a lot!Code:for i in `ls -la | awk '{print $9}' | grep -v lvx-frotix-pcs`; do grep -e "number" $i; done | grep -v ^# | awk '{print }'
Thanks!
- 06-08-2011 #2Linux user #126863 - see http://linuxcounter.net/
- 06-08-2011 #3Just Joined!
- Join Date
- Jan 2009
- Posts
- 8
This sounds like a school question

Have you tried breaking out the peices to learn what it's doing? That's really the first step to cleaning this up. I can tell you right off that it's a blatently complex way of doing something simple, so I assume it's some kind of test or something.
Swill


Reply With Quote
