10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
hello there,
basically im screwed with a variable that should take the last modification date of a file.
my code is
fileCreationTime=$(( `ls -l $fileName | tr -s " " | cut -d " " -f6` ))
my problem arise coz when the code is executed and stored in a file the return value is 1993 and not... (4 Replies)
Discussion started by: thurft
4 Replies
3. Shell Programming and Scripting
Hi All,
I need to compare the string variable with input value which have more than one word which also should be case insensitive.
#!/bin/sh
echo "please choose your choice: "
read choice
if ` ]
then echo "correct"
else
echo "wrong"
fi
but i am getting the output for first word... (3 Replies)
Discussion started by: kalai
3 Replies
4. Shell Programming and Scripting
Hi
How are you people ..
I am facing another problem regarding awk below is my code
-bash-3.00$ export a=10
-bash-3.00$ echo $a
10
-bash-3.00$ echo "" | nawk -v var=$a ' { if(var=10) { print "abc" } else { print "def"} } '
abc
-bash-3.00$ echo "" | nawk -v var=$a ' { if(var==10)... (2 Replies)
Discussion started by: aishsimplesweet
2 Replies
5. Shell Programming and Scripting
#bash
curVer=`cat /var/sadm/clsversion | cut -f 2 -d "_"`
echo "CurVer:$curVer"
ls |grep -v tar| grep -v sh| grep -v log|cut -f 1 -d "_" | sort -u >tmp1
for line in $(cat tmp1)
do
ver=`echo $line_$curVer`
ls $line* |sort >tmp2
grep -n ${ver} tmp2 >/dev/null
... (2 Replies)
Discussion started by: rajamohan
2 Replies
6. Shell Programming and Scripting
Can anyone help me?...I don't know why the second 'echo $contador' always shows 0 (zero):
1 #!/bin/bash
2 contador=0
3 while read linea
4 do
5 echo
6 echo "$linea" | while IFS="" read -n 1 caracter
7 do
8 contador=$((${contador}+1))
9 echo $contador... (5 Replies)
Discussion started by: albertogarcia
5 Replies
7. Shell Programming and Scripting
Hi Friends,
I have a problem when i run this piece of script, and do echo $? it always gives me value 0, even if the string "CCRCWebServerINSTALLDIR" is not present in that file. Why is that so, can you give me suggestion to the changes i need to make?
$find... (3 Replies)
Discussion started by: asirohi
3 Replies
8. Shell Programming and Scripting
suppose i declare
a=b
b=30
echo $(echo $a)
i need to get the value as 30
i dont know if im right but it prints only 'b' as output.
How can i get the value referred by 'b' through the value of 'a' (4 Replies)
Discussion started by: SankarV
4 Replies
9. UNIX for Dummies Questions & Answers
I am trying to use two files and walk through the first one to see if a value from each record resides in the other file.
I am reading the file record by record and awking out the first field into a varaiable. That is working fine.
When I try to write my grep command it gives me an error.
... (7 Replies)
Discussion started by: MizzGail
7 Replies
10. Shell Programming and Scripting
Dear All,
I am trying to write an script to calculate geometric centre of selected residues of a protein structure. Say I have a PDB file (a text containing the x, y, and z coordinates of atoms of a protein). I want to extract the X coordinates of the atoms belonging to the interested residues... (2 Replies)
Discussion started by: siavoush
2 Replies