![]() |
|
|
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 |
| Need to replace the first word of a line if it occurs again in the next line(shell) | geeko | Shell Programming and Scripting | 4 | 06-18-2009 03:36 PM |
| cut last line of a word | bullz26 | Shell Programming and Scripting | 2 | 03-18-2008 11:42 AM |
| how to move word by word on command line | pbsrinivas | UNIX for Dummies Questions & Answers | 1 | 11-23-2007 06:17 AM |
| put each word in new line - sed or tr | hemangjani | Shell Programming and Scripting | 3 | 09-13-2006 03:06 PM |
| Can a shell script pull the first word (or nth word) off each line of a text file? | tricky | Shell Programming and Scripting | 5 | 08-17-2006 07:29 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
i have this line
my,name,is,john stored in a file d.sh and i wish to print the line as string..but im getting word by word...have tried this......... for in $(cat $d.sh); do echo $i done but this is giving me my name is john |
|
||||
|
Quote:
thanx a lot ghostdog that was straight forward really appreciate it! if i have 2 files to compare the lines how do i do it with the While loop say file 1 has my name is john file2 my name is jon i want to compare if the lines in each file are the same have tried cat 'file.1' | while read line; do c=$line cat 'file.2' | while read line do d=$line if test "$c" != "$d" then echo $c is different fi done done prints continously |
|
||||
|
thanx mate i have been using the diff , cmp, comm and patch but with the files i was doing include an md5sum but still the outcome isnt true thus trying to do it manually with the while loop......if u get a chance just correct me in the While loop
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|