Computing.Net > Forums > Unix > assigning a variable

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

assigning a variable

Reply to Message Icon

Name: Nanda
Date: September 16, 2003 at 02:43:39 Pacific
OS: Win 2k
CPU/Ram: P IV & 64kb
Comment:

Hi,
i have a major problem in assigning the variable in the following script:
#!/bin/ksh
for file in send*.log
do
if [ -f ${file}]
then
grep "filename" ${file} >> temp
grep "process number" ${file} >> temp
#PROBLEM part:
set pnum=cat temp | tail -1 temp
#temp file holds filename &Process number. pnum has to take process number from temp(ex:pnum=16244)
echo " ${pnum} " #displays pnum value
main script
set -v
ndmcli ;#here pnum value is not assigned. WHAT TO DO?
EOJ
else
exit
fi
done


help me
does it require any ascii,binary,octal,hexa conversion. why is it not assigned.when i give user input value ,scripts executes(i.e pnum=16256)
OR have i used any wrong command in the variable assigning part

kindly help me
Thank u
anu



Sponsored Link
Ads by Google

Response Number 1
Name: Nanda
Date: September 16, 2003 at 02:53:12 Pacific
Reply:

script missing in the main part
select statistics pnumber=$pnum;


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: assigning a variable

Assignment of Variable www.computing.net/answers/unix/assignment-of-variable/7529.html

assigning a variable to a script www.computing.net/answers/unix/assigning-a-variable-to-a-script/5566.html

Prob Assign Row count to a variable www.computing.net/answers/unix/prob-assign-row-count-to-a-variable/7875.html