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
Hi,
I'm facing some problem with printing the values in the variables
I have passed all the database values into the variable, but when i echo the variable i get the values printed in one line
var=`echo <query> | database`
echo $var
or
awk 'BEGIN {printf("%s\n","'"${var}"'")}'
this... (4 Replies)
Discussion started by: prash_b
4 Replies
3. 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
4. Linux
Cud some one pls help me wit some partitions of linux filesystem wit their meaning....urgent cos is an assignment (5 Replies)
Discussion started by: GODBLESSME
5 Replies
5. 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
6. Shell Programming and Scripting
Hello expert.
I have a little problem here.
I write a script and stuck some bug to fix.
I found the problem was about * and a sample of script is below.
line 1 is print * out
but line 3 print all name of files in the script's path. (but I want *)
I want to contain * in variable... (3 Replies)
Discussion started by: MaYuMi
3 Replies
7. Shell Programming and Scripting
Hi,
I need a little help with variable use:
I have the a file with follow format:
Type: Test
Profile: 010
84240 27 15
84900 11 09
84993 55 44
84762 12 12
I need to look the value in the line containing "Profile" and put in front of the lines containing numbers... (6 Replies)
Discussion started by: cgkmal
6 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I am having a problem with assigning a value to a variable. The empname is looked for in the employees file and I am trying to assign it to the jobnum variable in the following statement
jobnum= cat/etc/employees | grep $empname | cut -d : -f 5
It is getting the right answer but it is... (3 Replies)
Discussion started by: rodney08
3 Replies
9. UNIX for Dummies Questions & Answers
Hello Everyone,
I am currently working with a DB2 (ver 8.1) table (Newly Created) and I am running a basic DB2 Select query into a variable. The field and it's size are VARCHAR(20). Since I need to pass the variable through some java I have noticed that when the results come back from the query... (0 Replies)
Discussion started by: Bob_Loblaw
0 Replies
10. 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