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
SPARC: Using Solaris Live Upgrade to Upgrade From Solaris 8 to Solaris 10 05/08 (or L iBot Solaris BigAdmin RSS 0 03-09-2009 03:30 PM
Solaris 10 System Administration Essentials (Solaris Series) iBot Solaris BigAdmin RSS 0 01-16-2009 09:30 AM
Solaris Jedi: A quick way to check UDP ports on Solaris iBot Solaris BigAdmin RSS 0 12-03-2008 09:20 AM
run xclock from local solaris to remote solaris panchpan SUN Solaris 9 06-30-2008 11:05 AM
Disk Mirror in Solaris 9 via Solaris Volume Manager deal732 SUN Solaris 3 05-02-2007 12:43 PM

Closed Thread
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
  #1 (permalink)  
Old 04-03-2009
talashil talashil is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 61
awk on Solaris

Hi,

we have a shell script like this ..

# make sure all parameters are dealt with in upper case.
for option in ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9}
do
option_name=`echo ${option} | awk -F \= '{print $1}'`
if [ "${option_name}" == "SID" ]
then
SID=`echo ${option} | awk -F \= '{print $2}'`
else
typeset -u option
eval ${option}
fi
done



it's working fine on AIX and it's failing on "option_name=`echo ${option} | awk -F \= '{print $1}'`" on Solaris . Syntax looks oky for me . And it's not giving exact error too .

do you see any thing different for Soalris 10 ( awk part)



Thanks
  #2 (permalink)  
Old 04-03-2009
TonyFullerMalv's Avatar
TonyFullerMalv TonyFullerMalv is offline Forum Advisor  
Registered User
  
 

Join Date: Sep 2008
Location: Malvern, Worcs. U.K.
Posts: 748
Your line:

Code:
awk -F \= '{print $1}'

has a space between the "-F" and the "\=" which will cause it to fail in Solaris, also I would have written that as follows:

Code:
awk -F"=" '{print $1}'

  #3 (permalink)  
Old 04-03-2009
talashil talashil is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 61
ThankYou . I will give it a try !!!
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 06:29 PM.


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