10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I am facing a problem.
export local_folder=/opt/app/
cd /opt/app/abc/
abcversion="abc*" (abcga5 is inside /opt/app/abc/)
echo $abcversion (it echoes the correct version as abcga5 )
Now when I reuse the value of abcversion for a below path:
export... (6 Replies)
Discussion started by: ankur328
6 Replies
2. Shell Programming and Scripting
Hi
I have a strange problem:
In my shell script I am performing a copy task:
. prop.txt
cp -r $dir/ $dir/archive
$dir is fetched from a property file (prop.txt) which stores its value
dir=/opt/data
Now the problem is another dir1 comes into picture. I only want to add... (1 Reply)
Discussion started by: ankur328
1 Replies
3. Shell Programming and Scripting
i have file that contains data as follows
1
2
3
now i need to assign them into three variables
a1=1
a2=2
a3=3
Everything should come under a loop. In reality i may have 10 values which has to be assigned to 10 variable. if i have 25 values ( lines) , each should be assigned into... (3 Replies)
Discussion started by: Rajesh_us
3 Replies
4. Shell Programming and Scripting
Hi There,
I am writing a ksh script which assigns variable values from file "A" and passes that variables to file "B". While passing the parameters an additional "$" sign is being assigned to awk -v option.
Could any one help me with this please.
#!/bin/ksh
head -1... (3 Replies)
Discussion started by: Jeevanm
3 Replies
5. Shell Programming and Scripting
Hi,
In AIX I have a variable with , (coma) separated values assigned to it like shown below
var1=apple,boy,chris
i want to convert this to
var1='apple','boy','chris'
the number of values assigned to var1 might change and it could be from 1 to n
any suggestions please? (3 Replies)
Discussion started by: rahul9909
3 Replies
6. Shell Programming and Scripting
Hi,
i have an issue with eval and variable assignment.
1) i have a date value in a variable and that date is part of a filename,
var1=20100331
file1=${var1}-D1-0092.xml.zip
file2=${var2}-D2-0092.xml.zip
file3=${var3}-D3-0092.xml.zip
i am passing the above variables to a script via... (11 Replies)
Discussion started by: mohanpadamata
11 Replies
7. Shell Programming and Scripting
I am using a piece of code which is working fine in some cases and is not working in some other instances. All I am doing is grep'ing and concatenating.
Below is a working scenario.
$ echo $var1
REPLYFILENAME=Options_NSE1.txt.enc
$ FILE_NM=`echo ${var1##*=}`.gz (Take everything after... (1 Reply)
Discussion started by: jamjam10k
1 Replies
8. Shell Programming and Scripting
Hi all,
I am having some value in feedrow in my script.
And want to assign first three character in to DTYPE.
I am using following syntax.
DTYPE=`$FEEDROW|cut -c 1-3`
But it's not assigning this valuse into DTYPE.
Please suggest.
Its really uegent.
Regards,
Gander_ss (2 Replies)
Discussion started by: gander_ss
2 Replies
9. Shell Programming and Scripting
Hi,
I'm writing a KSH script, and at one point, I have to call a new shell and perform some variable assignments.
I noticed that the assignment is not working.
Please see two samples below:
Command 1:
#>ksh "i=2;echo I is $i"
Output:
#>I is
Command 2:
#>ksh <<EOF
> i=2
> echo I... (7 Replies)
Discussion started by: maverick80
7 Replies
10. UNIX for Dummies Questions & Answers
Hello Everybody,
Does anyone know what the @ symbol means in a csh script, if used with a variable assignment as below
@ line = 1
why not just use....
set line=1
Many thanks
rkap (1 Reply)
Discussion started by: rkap
1 Replies