![]() |
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 |
| Multiple file processing - 1st line only to process - search/match substring | toneatlondon | Shell Programming and Scripting | 2 | 01-02-2008 09:20 PM |
| AWK Multi-Line Records Processing | RacerX | Shell Programming and Scripting | 10 | 10-18-2007 08:46 PM |
| Appending the line number and a seperator to each line of a file ? | pjcwhite | Shell Programming and Scripting | 4 | 03-21-2007 01:29 AM |
| Remove header(first line) and trailer(last line) in ANY given file | madhunk | Shell Programming and Scripting | 2 | 03-13-2006 03:36 PM |
| processing line in file | fablef00 | Shell Programming and Scripting | 8 | 01-23-2006 11:41 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
File processing line by line
Hi,
I am doing file processing line by line. while reading each line at a specified location I am searching for a particular character and then write that line to another file. Problem is while writing to another file it was supressing the spaces, which I don't want to do. Any help is appreciable. the code I used is processLine(){ line="$@" # get all args type=`echo $line | cut -c37` if [ $type = 'A' ] ; then atlr=`expr $atlr + 1` echo $line echo $line >> trana fi } example : abc1234 XXX40 1100 it was writing to file as abc1234 XXX40 1100 Thanks in advance |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|