10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file that I'm trying to place into a variable.
I've tried the following:
DATE=`date +%Y%m%d`
filez=$(cat /tmp/Test_$DATE.txt)DATE=`date +%Y%m%d`
filez=$(</tmp/Test_$DATE.txt)DATE=`date +%Y%m%d`
filez=$(`cat /tmp/Test_$DATE.txt`)None of these lines allows the file to go into the... (3 Replies)
Discussion started by: newbie2010
3 Replies
2. Shell Programming and Scripting
Hi
I have a requirement of taking time as input variable outside the script.depending on the time it will check the file output .like
./script.sh <30 min>
so script.sh should run every 5 minutes ie.6 times to check the output file.Can any one please help here. (7 Replies)
Discussion started by: netdbaind
7 Replies
3. Shell Programming and Scripting
Dear All ,
i stuck in one problem executing xml .. i have input xml as
<COMMAND name="ARRANGEMENT.WRITE" timestamp="0" so="initial">
<SVLOBJECT>
<LONG name="CSP_PMNT_ID" val="-1"/>
<MONEY name="CSP_CEILING" amount="0.0" currency="AUD"/>
... (6 Replies)
Discussion started by: arvindng
6 Replies
4. Shell Programming and Scripting
Dear mentors, I just need little explanation regarding for loop to give input to awk script
for file in `ls *.txt |sort -t"_" -k2n,2`; do
awk script $file
done
which sorts file in order, and will input one after another file in order to awk script
suppose if I have to input 2 or... (4 Replies)
Discussion started by: Akshay Hegde
4 Replies
5. Shell Programming and Scripting
Hi,
I would like to compare 2 files using awk, which I can do by using:
awk 'NR==FNR{a;next} (NR > 32 && $2 in a) {print $0}' File1 and File2.
If the name of the File1 is in another file (for example, column 4 in File 3) then how can I pass this column 4 to the awk command.
Thanks in... (1 Reply)
Discussion started by: ezhil01
1 Replies
6. UNIX for Dummies Questions & Answers
Here is the requirement, When I run the "run file KSH (sql)", it should substitute
'${pCW_Bgn_DT}' with 201120
and
'${pCW_End_DT}' with 201124
Input File
----------
$ cat prevwk.dat
201124 20110711
run file KSH (sql)
------------------
In this file, I want to use the variables... (1 Reply)
Discussion started by: shanrice
1 Replies
7. Shell Programming and Scripting
Hi guys,
Does awk have a built-in variable which I can use to display the input file it's currently reading?
I'm currently concatenating multiple files using awk and later on do some parsing. But for now, I want to add an extra column in the main output data file - basically putting in the... (3 Replies)
Discussion started by: Det7
3 Replies
8. Shell Programming and Scripting
I need to know how the the string constant from Input File should be read and provide as input data for the script .
INPUT FILE
CONST VARIABLE
myname=/root/dir/syslog/myname1
myname=/root/dir/syslog/myname2
myname=/root/dir/syslog/myname3
urname=/root/dir/syslog/urname1... (6 Replies)
Discussion started by: baraghun
6 Replies
9. Shell Programming and Scripting
Hello,
I am working with KSH on AIX and I have 2 files generated from different sources... as seen below:
FILE1 FILE2
AAA AAA@ABS0001C
BBB BBB@ABS0003D
CCC CCC@ABS0023A
DDD DDD@ABC0145D
EEE EEE@ABS0090A
FFF FFF@ABS0002A
GGG GGG@ABC0150D
HHH
FILE1 is main main data source,... (4 Replies)
Discussion started by: right_coaster
4 Replies
10. UNIX and Linux Applications
Hi
I am trying to edit a csv file. Bacically I need to input a search variable and the value that must be changed in one of the fields corresponding to that searched variable.
My csv file looks like so:
1,1A,5
1,1B,2
1,1C,3
2,2A,7
2,2B,4
2,2C,0
3,3A,1
3,3B,6
3,3C,4
I want to... (4 Replies)
Discussion started by: ladyAnne
4 Replies