10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a code like this
v_num=9
comp_num=39
if
then
echo "pass"
fi
echo "end"
I am getting an error
ksh: v_num=99
comp_num=39
if
then
echo "pass"
fi
echo "end" (3 Replies)
Discussion started by: swayam123
3 Replies
2. Shell Programming and Scripting
Hi, I was wondering if anyone could assist me for (what is probably) a very straightforward answer.
I have input files containing something like
File 1
Apples
Apples
Apples
Apples
File 2
Bananas
Bananas
Bananas
Bananas (4 Replies)
Discussion started by: hubleo
4 Replies
3. 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
4. Shell Programming and Scripting
I have a situation where my variable needs to pick up any of the 4 values from the environment it is in
for e.g i am on server named a
server=a (script running on this server)
ftp servers= b c d e ----- the parameter passed should be any of these values in these 4 values, if not throw an... (4 Replies)
Discussion started by: dsravan
4 Replies
5. Shell Programming and Scripting
suppose in my script i have written
a1=2
a2=4
read option
# I directly want to see the value of a1 or a2 (i:e; 1 or2 )depending upon i/p given like a1 or a2 to option var.so what should i give .Suppose if I give a1 to option then how can I see the value.
echo $$option --- doesn't work
pls... (3 Replies)
Discussion started by: maitree
3 Replies
6. Shell Programming and Scripting
I wnat to assign a set of values to a variable
and
use it in if condition.
for example:
i=$1
d=1 2 3 4 5 6
if
then
echo "Fine"
else
echo "Check"
fi
i will either of the value in d, i.e. i can be 1 or 2 or any value in d, How this can be done?
Thanks in advance (2 Replies)
Discussion started by: sol_nov
2 Replies
7. Shell Programming and Scripting
Hi - Help needed.
I have an input file that looks something like this, but with a lot more entries:
A
Customer1
B
4500
C
8000
A
Customer2
B
6422
C
8922
I need to be able to print details for each customer on one line per customer.
ie. if I could print these to a file and then cat... (3 Replies)
Discussion started by: frustrated1
3 Replies
8. Shell Programming and Scripting
Hi Guru`s,
I have to write a prog. which will traverse through diff. directories and then extract some data from files. I have written it and its working fine.
But I have tested it in 1 folder.
There are many folders and I need to loop through each of them. I am not sure abt the... (4 Replies)
Discussion started by: unx100
4 Replies
9. UNIX for Dummies Questions & Answers
i try to get the year and month values using the below shell script
when i enter the script like this
#!/usr/bin/ksh
dd=`DATE +%Y%M`
echo $dd
it is showing the error as shown below
abc.ksh: DATE: not found
any suggestions please (3 Replies)
Discussion started by: trichyselva
3 Replies
10. Shell Programming and Scripting
Hi,
I have some problem in assigning values to variables: This is what Iam literally doing:
i=0
input=test
temp$i = $input
In the sense, I try to assign the value in the variable input (ie., test) to another variable temp0 (since i is assigned 0, temp$i is temp0). Seems simple, but I get... (3 Replies)
Discussion started by: mohanprabu
3 Replies