The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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
convert unix script to perl gholdbhurg Shell Programming and Scripting 2 03-25-2008 01:42 PM
How to convert this linux command to Unix AIX? chris13work UNIX for Dummies Questions & Answers 1 11-20-2007 06:56 AM
grepping the output of a command in an if statement hcclnoodles Shell Programming and Scripting 3 06-29-2007 07:00 AM
awk command for INSERT statement nattynatty Shell Programming and Scripting 4 05-10-2002 02:11 PM
convert dwg to ps in Linux/Unix shell Jonny5000 UNIX for Dummies Questions & Answers 1 07-25-2001 01:22 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-20-2008
krishna_gnv krishna_gnv is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 17
How to convert unix command into Awk statement

Hi all,

How can i use the below unix command in AWK . Can any one please suggest me how i can use.

sed -e "s/which first.sh/which \$0/g" $shell > $shell.sal

where $0=current program name(say current.sh)
$shell=second.sh
  #2 (permalink)  
Old 05-20-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
Code:
awk "{ gsub (\"which first\.sh\", \"which $0\") } 1" $shell >$shell.sai
Sponsored Links
Closed Thread

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 12:05 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
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