10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Below is my ksh shell script where I need to check if variable fileprops is a subset of $1 argument.
echo "FILE PROPERTY: $fileprops"
echo "PARAMETER3: $1"
if ; then
echo "We are Good. $line FILE is found to be INTACT !! "
else
echo... (2 Replies)
Discussion started by: mohtashims
2 Replies
2. Shell Programming and Scripting
Dear Users,
I am writing a for loop in shell (BASH), and am struggling with a very specific detail:
SU_DATA=/home/........./su/
for(blah blah blah)
{
a=1001
b=1002
suop2 $SU_DATA/$a_clean.su $SU_DATA/$b_clean.su op=sum > W1.su
}
Here, it looks like the variables are... (1 Reply)
Discussion started by: martm
1 Replies
3. Shell Programming and Scripting
Hi,
I am trying to do this:-
FILE=application.log
PID=12345
FILE=`echo $FILE | awk -F "." '{print $1 "$PID" $2}'`
echo $FILE
application$PIDlog
I need the output to be application12345.log but I am not sure how to get the $PID variable into the output. I have tried various things... (3 Replies)
Discussion started by: sniper57
3 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
I am trying to to compare a string variable with a string literal inside a loop but keep getting the
./testifstructure.sh: line 6:
#!/bin/sh
BOOK_LIST="BOOK1 BOOK2"
for BOOK in ${BOOK_LIST}
do
if
then echo '1'
else
echo '2'
fi
done
Please use next... (1 Reply)
Discussion started by: daveu7
1 Replies
5. Shell Programming and Scripting
I have a variable
var=string1:string2:string3
I want to get the string de-concatenated and put it as
var1=string1
var2=string2
var3=string3
Thanks in advance.
---------- Post updated at 02:18 PM ---------- Previous update was at 01:45 PM ----------
I got the solution as below:... (2 Replies)
Discussion started by: Deepak62828r
2 Replies
6. Shell Programming and Scripting
I want o add a variable in addition to a file which will be send with sendmail. I have problems to find the correct syntax for concatenating this variable called $MyVariable.
sendmail mai@domain.com </tmp/errormessage.txt $MyVariable]
Thanks for your help! (2 Replies)
Discussion started by: high5
2 Replies
7. Shell Programming and Scripting
Input
#GEO-1-type-1-fwd-Initial 890 1519
OPKHIJEFVTEFVHIJEFVOPKHIJTOPKEFVHIJTEFVOPKOPKHIJHIJHIJTTOPKHIJHIJEFVEFVOPKHIJOPKHIJOPKEFVEFVOPKHIJHIJEFVHIJHIJEFVTHIJOPKOPKTEFVEFVEFVOPKHIJOPKOPKHIJTTEFVEFVTEFV
#GEO-1-type-2-fwd-Terminal 1572 2030... (7 Replies)
Discussion started by: patrick87
7 Replies
8. Shell Programming and Scripting
Hi,
I want to display the string value with number value. I dont know how to display. Can anyone help me.
This is my code
export A=${file_name}
echo $a $b $sum | awk '{ printf "%011.f,%014.f,%014.f\n", $1,$2,$3}' >> ${MRR_OUTPUT}
the out put shold be
${A}, $a, $b
filename,... (2 Replies)
Discussion started by: easterraj
2 Replies
9. Programming
Hi,
Well as the title says, I have an array of strings (delimited by null). The length of the array is variable and length of each string is variable as well. What I need is one huge string with the original strings in the array separated by spaces.
For example is an array is such that array... (12 Replies)
Discussion started by: newhere
12 Replies
10. Shell Programming and Scripting
I just need to add a static ID to each output record so the users will be able to tell which group records in combined flatfiles come from I have the static ID in a bourne variable. I tried
awk '{print "${GroupID}" $0}' infile > outfile
But I ended up with the string ${GroupID} instead of... (5 Replies)
Discussion started by: gillbates
5 Replies