![]() |
|
|
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 |
| append two files | princessotes | UNIX for Dummies Questions & Answers | 1 | 05-01-2009 12:26 PM |
| append a ' to the $1 $2 | ppass | Shell Programming and Scripting | 2 | 05-26-2008 10:59 AM |
| Append using awk | Raynon | Shell Programming and Scripting | 4 | 11-04-2007 06:19 AM |
| ftp append | brdholman | UNIX for Dummies Questions & Answers | 1 | 10-31-2007 10:02 AM |
| append to fle using sed | shweta_d | Shell Programming and Scripting | 2 | 06-13-2007 03:57 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
How to append using sed
Hello all, I want to use sed to append a variable stored in $i, how do i do that? $i contains a path to a directory and i want to append it before the result i get from awk statement, before affecting awk results. rite now out put i get from code below is:- Code:
The path is: /net/icebox/vol/local_images/spins/7.1/CQ/7.1.D081110/ basement.sun5 msgcat.JPN.sun5 perl.sun5 CMServer.CQ.sun5 Output desired:- Code:
The path is: /net/icebox/vol/local_images/spins/7.1/CQ/7.1.D081110/ basement.sun5 /net/icebox/vol/local_images/spins/7.1/CQ/7.1.D081110/ msgcat.JPN.sun5 /net/icebox/vol/local_images/spins/7.1/CQ/7.1.D081110/ perl.sun5 /net/icebox/vol/local_images/spins/7.1/CQ/7.1.D081110/ CMServer.CQ.sun5 /net/icebox/vol/local_images/spins/7.1/CQ/7.1.D081110/ Code:
check_sun() {
for i in $SUN_PLATFORM
do
$ECHO "The path is: " $i
$LS $i | $GREP .su | $AWK -F"_" '{print $1}'
done
}
Thanks Adsi Last edited by vgersh99; 08-24-2009 at 11:35 AM.. Reason: code tags, PLEASE! |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|