![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Awk Parsing | bombcan | Shell Programming and Scripting | 2 | 04-24-2008 11:45 AM |
| TAHI Test Suite 3.0.13 (IPv6 Conformance Test Tool branch) | iBot | Software Releases - RSS News | 0 | 04-06-2008 09:20 AM |
| test and .test in same directory | vikashtulsiyan | SUN Solaris | 14 | 12-27-2007 11:25 PM |
| Keithley Introduces Linux-Based RF Parametric Test Systems - Test and Measurement.com | iBot | UNIX and Linux RSS News | 0 | 07-23-2007 07:30 AM |
| XML parsing | handak9 | High Level Programming | 1 | 11-01-2004 05:13 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Parsing a configuration Test tile
Team I need help parsing a text file that meet the layout below:
high:850:856:214:855:810 med:852:304:310 low:315:240:323:310 I need to read each line and if for example a line start with high in in that same line there is a 850 or any other number then I wan to print it. The same ohld true for any other line. Thank you edpdgr |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
lp -dprinter_name $(grep "high" file)
or grep "high" file > file lp -dprinter_name file you can try.... Last edited by alamitab; 02-11-2008 at 01:06 PM. |
|
#3
|
|||
|
|||
|
This will not work
|
|
#4
|
|||
|
|||
|
Code:
grep ^high filename | grep "[0-9]" | lpr |
|
#5
|
|||
|
|||
|
Thank you very much this was so simple.
|
|||
| Google The UNIX and Linux Forums |