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
#!/bin/sh
if
then
echo "Insufficient number of arguments ">> error".log" ;
echo "Please check error log for more details";
exit 1 ;
else
file_name=$1".csv";
fi ;
in_par_number=`head -n1 $file_name | sed 's///g' | wc -c`
read -a arr <<< `head -n1 $file_name | sed 's// /g'`
... (6 Replies)
Discussion started by: JayDoshi
6 Replies
3. 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
4. Shell Programming and Scripting
guys,
i would like to know what does the below does.
tr=`echo $bfile | cut -d"." -f4`
tr=${tr#TR}
i tried with assigning a value and executed second line. but after that also value of tr remains same.
thanks in advance .. (1 Reply)
Discussion started by: expert
1 Replies
5. Shell Programming and Scripting
Hi,
I have a requirement as follows, need to call the format of ${$var} form.
For example, i am taking a variable.
count=1,
((LIMIT_$count=$count + 1))
Now i have to echo this variable LIMIT_$count. (This is in a loop..)
echo ${LIMIT_$count} - displays as a syntax... (3 Replies)
Discussion started by: abhisheksunkari
3 Replies
6. 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
7. Shell Programming and Scripting
Hi all,
I’m very new to UNIX programming. I have a question on dynamic variable
1. I’m having delimited file (only one row). First of all, I want to count number of columns based on delimiter. Then I want to create number of variables equal to number of fields.
Say number of... (5 Replies)
Discussion started by: mkarthykeyan
5 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
Hello,
I would like to assign number of lines in a file to a variable (to be passed later as an argument to a function). I am doing it like this:
numLines=wc -l < file.txt
which gives an error. Could somebody help? (2 Replies)
Discussion started by: DDD
2 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