| | |
grep into one line
Please support our Perl advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: May 2007
Posts: 1
Reputation:
Solved Threads: 0
Hi
i ahve following find & grp command the command look into the file and check the pattern and output to three lines.
is it is possible this output into one line seperated with some characters
-------
find ./*temp.log* | xargs -i{} cat {} | egrep -e 'Control:' -e 'Run' |cut -c1-100
the out put of this file is
Control File: /u01/cle/dc/der/temp.ctl
Run began on Wed May 23 23:15:00 2007
Run ended on Wed May 23 23:31:20 2007
i need the out put like in one continoous line
Control File: /u01/cle/dc/der/temp.ctl , Run began on Wed May 23 23:15:00 2007 ,Run ended on Wed May 23 23:31:20 2007
i ahve following find & grp command the command look into the file and check the pattern and output to three lines.
is it is possible this output into one line seperated with some characters
-------
find ./*temp.log* | xargs -i{} cat {} | egrep -e 'Control:' -e 'Run' |cut -c1-100
the out put of this file is
Control File: /u01/cle/dc/der/temp.ctl
Run began on Wed May 23 23:15:00 2007
Run ended on Wed May 23 23:31:20 2007
i need the out put like in one continoous line
Control File: /u01/cle/dc/der/temp.ctl , Run began on Wed May 23 23:15:00 2007 ,Run ended on Wed May 23 23:31:20 2007
![]() |
Similar Threads
- grep '^[a-zA-Z]' (Shell Scripting)
- 'GREP' usage on huge files, any Limitation? (Shell Scripting)
- automated email on a log event (Shell Scripting)
- Quick Reference for Linux Commands (Getting Started and Choosing a Distro)
- Using Grep (*nix Software)
- derive full name of user and grep search count (Shell Scripting)
- Need help getting specific info out of a file (*nix Software)
Other Threads in the Perl Forum
- Previous Thread: Data consolidation across an array a.k.a. Hashed to death... heeelp...
- Next Thread: Compare two Text File
| Thread Tools | Search this Thread |





