The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 08-24-2009
asirohi asirohi is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 56
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
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:18 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0