10 More Discussions You Might Find Interesting
1. Solaris
i am trying to assign the following expression to a variable in Unix shell script
and want to use that variable in some other expression. But unable to get the required thing done. Please help with this....
This is the expression which i want to provide as input the variable
date '+%y:%m:%d' |... (3 Replies)
Discussion started by: ssk250
3 Replies
2. Shell Programming and Scripting
Hi
I have a script that accepts an input date in YYYY-MM-DD format.
After that, I used sed to delete the hyphen (-) which gives me an output YYYY MM DD.
My question is, how can I assign those three numbers to a three different variable.
Example:
2013-11-23 will become 2013 11 23... (4 Replies)
Discussion started by: erin00
4 Replies
3. Shell Programming and Scripting
eval echo \$tts_space_name$count
i m getting output of this stmnt as
'TBS_ADOX_EXTR3'
but,
I m not able to assign this value to a variable .
i tried
export j=`eval echo \$tts_space_name$count`
eval j= `eval echo \$tts_space_name$count`
and when i do echo $j ... i get o/p as 1 or 2... (1 Reply)
Discussion started by: Gl@)!aTor
1 Replies
4. Shell Programming and Scripting
my script is some thing like this
i11="{1,2,3,4,5,6,7,8,9,10,11,}"
echo "enter value"
read value ..............suppose i11
x="$value"
echo "$($value)" .............the echo should be {1,2,3,4,5,6,7,8,9,10,11,}
but its showing "i11" only.
plz help me out to get desired... (10 Replies)
Discussion started by: sagar_1986
10 Replies
5. Shell Programming and Scripting
Hi All,
I have a tcsh script as:
#!/usr/bin/csh -x
set packsName=$(awk -F'' '/^execute.*=true/{print $2}' ExecutePacks.config)
for var in $packsName
do
echo "printed $var"
done
I want to assign the value which is returned by awk function to the variable called packsName.
How do I... (2 Replies)
Discussion started by: AB10
2 Replies
6. Shell Programming and Scripting
Dear All,
I have one problem in my script, awk statement as
1. it is not evaluate the second variable $stake but the first one $channel is being done.
2.I want to assign the whole awk statement to a variable actual_code which is not being executed in my script.
#!/usr/bin/sh
echo "Enter... (3 Replies)
Discussion started by: chinmayadalai
3 Replies
7. Shell Programming and Scripting
Hi folks.
I have this variable called FirstIN that contains something like this: 001,002,003,004...
I am trying to assign the content of this variable into ModifiedIN but with the following format : 001 002 003 004...(changing the commas for spaces)
I thought about using sed but i am not... (17 Replies)
Discussion started by: Stephan
17 Replies
8. Shell Programming and Scripting
Is there any difference between:
set variable=39 and variable=39 (1 Reply)
Discussion started by: proactiveaditya
1 Replies
9. Shell Programming and Scripting
hi all,
in ksh, how do i assign the output of a find command to a variable, e.g
am trying something like this :
totalNoFiles=$(print find ./ -name "SystemOut*.log");
but when i echo $totalNoFiles it displays
find ./ -name "SystemOut*.log"
instead of the total number of... (2 Replies)
Discussion started by: cesarNZ
2 Replies
10. Shell Programming and Scripting
Another newbie to Unix scripting Q..
How do you assign a value resulting from a command, such as awk, to a variable.
I am currently trying:-
$awk '{print $1}' file1 > variable1
with no change to $variable1.
The line:
$awk '{print $1}' file1
does print the first line of the... (3 Replies)
Discussion started by: sirtrancealot
3 Replies