[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep help, how do i make this shorter?
From: |
UniXman1234 |
Subject: |
grep help, how do i make this shorter? |
Date: |
Wed, 30 Jan 2008 22:31:41 -0800 (PST) |
Hi everyone, im trying to make the following command line shorter by
introducing a script that join up all the grep commands
./new1a < numbers.txt | grep -i -v '^a ' | grep -i -v '^the ' | grep -i -v
'^or ' | sort -f
How would I go about merging all the greps into a scripe and putting all the
words that should be excluded into a data file
so would it be something like this
---exclude---
#!/bin/sh
# exclude.sh
grep -i -v ^datafile.txt
----end--------------
---datafile.txt---
a
the
or
---end.txt---
so i would be able to execute it like
./new < numbers.txt | exclude | sort -f
Thank you, i tried doing every possible way i could think of but it doesnt
seem to work. Im a newb just started script programming 2 weeks ago
--
View this message in context:
http://www.nabble.com/grep-help%2C-how-do-i-make-this-shorter--tp15198967p15198967.html
Sent from the Gnu - Bash mailing list archive at Nabble.com.
- grep help, how do i make this shorter?,
UniXman1234 <=