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 > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Passing a variable from a child script back to the parent Andy82 Shell Programming and Scripting 3 05-26-2008 09:52 PM
passing asterisk to a script as variable GKnight Shell Programming and Scripting 9 04-02-2008 10:32 AM
Passing a variable into an awk script Khoomfire UNIX for Advanced & Expert Users 5 09-05-2006 08:44 AM
passing ip address as a variable to script for ftp Gerry405 UNIX for Dummies Questions & Answers 2 09-01-2005 05:26 AM
passing awk variable to the shell script bcheaib Shell Programming and Scripting 3 07-21-2004 10:00 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 06-18-2007
aladdin aladdin is offline
Registered User
  
 

Join Date: Oct 2006
Posts: 78
passing variable to my script

Hello everybody:
Im trying to run the following script on my sol9 machine:

Code:
line=''

((lineCount= 0))

export lineCount

more /tmp/MSISDNs | wc -l > /tmp/tmp

cat /tmp/tmp | read lineCount

export lineCount;

while  (( lineCount > 0 )) 

do

        line= tail -$lineCount /tmp/MSISDNs | head -1 

        export line

        /opt/msp/opt/SAmsp/bin/prosubm_add -ms $line -hs off -ug postpaid -saa off  -v

        ((lineCount=lineCount-1)) 

done

#
As you can see Im passing all lines one by one to an application called "prosubm_add " which do kind of checking and filtering for value entered by "$line". However, when I test $line or echo it I can get it correct value, and when I substiute it by an integer value It works, but only when pass it as variable it gives me the follwing error:
Code:
Parameter value for parameter with name ( -ms ) is missing.

Command execution stopped with error(s)
do you have any idea why its not working when passing variables??

Thanks in advance
 

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 01:31 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