10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to pass letter like "c" for "-copy" and need to read by variable $sel_mod, My I know the good way of writing the script.
Example:
Select one of the Clone Mode ( '-copy', '-differential', '-precopy', '-nopcopy')
Type the Clone mode : c
Thanks in advance,
Ashan
... (6 Replies)
Discussion started by: ashanabey
6 Replies
2. UNIX for Advanced & Expert Users
Is there anyway in which i can set a permanent global variable in unix, which when initialised with a value and modified during any shell script, would retain its value even if i logout and login
I dont know whether i am being able to express my need clearly but basically what i want is a... (3 Replies)
Discussion started by: arindamlive
3 Replies
3. Shell Programming and Scripting
I have the following script and would like to know how to set the variable correctly.
FTP downloads the .rpm to the current directory, so the RPM command needs to know the directory it is in.
I could use ./test-application-1.0.i386.rpm to execute the command, but is there a way to set the... (6 Replies)
Discussion started by: nolamiami
6 Replies
4. Shell Programming and Scripting
I am working within a while loop and i am trying to set a variable that will read out each count of the files. the problem is the count variable i have set up gives me a total and not the individual count of each file. in the data area there is 4 abc.dat and 1 def.dat.
how can i do this???
... (2 Replies)
Discussion started by: Pablo_beezo
2 Replies
5. UNIX for Dummies Questions & Answers
In my script, I have the following command....
du -sk `ls -ltd sales12|awk '{print $11}'`|awk '{print $1}'
it returns the value
383283
I want to modify my script to capture that value into a variable. So, I try doing the following...
var1=`du -sk `ls -ltd sales12|awk '{print... (5 Replies)
Discussion started by: tumblez
5 Replies
6. Shell Programming and Scripting
How do you set a varible with information that contains a string and also another variable? For example:
subject="Attention: $name / This $type needs your attention"
The $xxxx are of course other variables that I instantiated earlier. Is it like Java where you have to use double quotes and... (1 Reply)
Discussion started by: briskbaby
1 Replies
7. Shell Programming and Scripting
L=0
cat test.sh | while read line
do
L='expr $1 + 1'
echo $L
done
echo $l
>>> the echo $L at the end produces 0 but i actually want it to produce the number of lines - any idea why this is happening? (16 Replies)
Discussion started by: penfold
16 Replies
8. UNIX for Dummies Questions & Answers
I want to set a variable to be any number of dashes. Rather than doing the following:
MYVAR="------------------"
I'd like to be able to set the variable to, say, 80 dashes but don't want to have to count 80 dashes. Is there a way to do this? (2 Replies)
Discussion started by: photh
2 Replies
9. Programming
I am trying to install GCC-3.1.1 on an SGI Indigo2. I already have MIPSpro 7.2.1 installed. However, when I try to configure GCC-3.1.1, I get the message "cc ERROR: cc -o conftest -g failed, You must set the environment variable CC to a working compiler."
What is the name of the MIPSpro c++... (1 Reply)
Discussion started by: mdbanas
1 Replies
10. UNIX for Dummies Questions & Answers
I am trying to install GCC-3.1.1 on an SGI Indigo2. I already have MIPSpro 7.2.1 installed. However, when I try to configure GCC-3.1.1, I get the message "cc ERROR: cc -o conftest -g failed, You must set the environment variable CC to a working compiler."
What is the name of the MIPSpro c++... (1 Reply)
Discussion started by: mdbanas
1 Replies