On Fri, 2003-12-19 at 05:06, Jake McHenry wrote: > Ok. Here is what I have. > > I have some bash files with: > > arg=$* > sa-learn --<list of args> $arg > > > One file is spam.spam, one is spam.ham, etc... They just have > different args in the sa-learn line... > > Anyways.. I then need input of any files in the directory containing > an email address, all on the same line for the input to spam.spam or > spam.ham..etc. > > So.. This works for the first part: > > grep -R 'email' * | awk -F: '{print $1}' | uniq | xargs echo -n > > This also works: > > grep 'email' * | cut -f 1 -d : | tr \\012 \\40 > > > I then need that input to go into the spam.spam or spam.ham files as > if I typed it all like: > > spam.spam file1 file2 file3 file4 > > > I can't figure out how to do this part, as I tried: > > grep 'nittany' * | cut -f 1 -d : | tr \\012 \\40 | spam.spam > > And > > spam.spam | grep 'nittany' * | cut -f 1 -d : | tr \\012 \\40 > > > Neither worked. > > So, for the time being, I said I will just run the first comamnd, copy > and past after the spam.spam or spam.ham filename. > > > > Does this clear things up? I understand what I want to do... Sorry if > I'm not explaining correctly. Do you need anymore info? Yes, I think.... :-) I think you are saying that spam.spam or spam.ham are shell scripts and you need args to the shell script. So..... Try..... spam.spam `grep 'nittany' * | cut -f 1 -d :` That is ` not ' Ed -- "An opinion is like an asshole - everybody has one." - Clint Eastwood as Harry Callahan, The Dead Pool - 1988. -- Shrike-list mailing list Shrike-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/shrike-list