![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| alternate lines | pstanand | Shell Programming and Scripting | 6 | 03-18-2008 11:14 PM |
| Alternate to pinging boxes | benefactr | UNIX for Advanced & Expert Users | 5 | 12-13-2007 04:40 AM |
| Alternate Logon Method? | earnstaf | Forum Support Area for Unregistered Users & Account Problems | 2 | 08-16-2007 03:54 PM |
| Alternate command for cut | Mohammed | Shell Programming and Scripting | 2 | 10-20-2006 07:42 AM |
| alternate lines from two files | SummitElse | UNIX for Dummies Questions & Answers | 1 | 02-24-2005 09:54 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Alternate way for echo.
Hi,
Is there any other command echo does. if [ `echo $line|grep "^$companyHdrRecord"| wc -l` -ne 0 ] I am doing this operation for each line in my file. So its taking very long time to process more than 1000 records. Is there any alternative way to write the above if statement |
|
|||||
|
I guess the problem might be the way you are using loop to get lines one by one.
if you are using loop like Code:
cat filename| while read line do ..... ..... done Code:
while read line do ... ... done < filename |
|
||||
|
|
|
|||||
|
Those 12 ways to parse a file is really good stuff.I would like to thanks google for sharing with all of us.(Before that i never given thought which one is better)
The method i suggested is one of those 12 ways and it is claimed to be one of the two better performers. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|