Re: Script file to customize scs2ascii output -Assistance needed.
"Mitch Martin" <[email protected]>
| Newsgroups | gmane.comp.emulators.tn5250 |
|---|---|
| Message-ID | <[email protected]> |
> > >/dev/null is to keep grep quiet... otherwise it would output > the line > >that > matched. If you want to see it when a match is found, then > you could take that out. The break is there so when it finds > a match it breaks out of the loop, since there's no reason to > keep looping once a match is found. > > If you want to pipe the output of scs2ascii through this > script, you would have to do it like so: > > #! /bin/bash > > file=`cat /dev/stdin` > users="PHILLIP SAM RICHARD" > > for user in $users; do > echo "$file" | grep $user >/dev/null && echo "$file" > > /home/misadmin/"$user"_`date > +%Y-%m-%d-%H:%m` && break > done > Thanks again, Toby... I look forward to using this information while working on my little project over the weekend. As a side note, O'Reilly Auto Parts came to our town, Monroe, NC., about a year ago. :-) Regards, Mitch -- This is the Linux 5250 Development Project (LINUX5250) mailing list To post a message email: LINUX5250-Zwy7GipZuJhWk0Htik3J/[email protected] To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/linux5250 or email: LINUX5250-request-Zwy7GipZuJhWk0Htik3J/[email protected] Before posting, please take a moment to review the archives at http://archive.midrange.com/linux5250.