Search Results

Search: Posts Made By: vedanta
3,084
Posted By Don Cragun
This is very convoluted logic. Using awk to read...
This is very convoluted logic. Using awk to read all of your 5000 files to get a list of files containing a certain string to use as arguments to another awk script is grossly inefficient since you...
3,084
Posted By RavinderSingh13
Hello Vedanta, Could you please try...
Hello Vedanta,

Could you please try following and let me know if this helps you.

awk -F'[=/]' 'BEGIN{print "File | Jobname | node | pfile | metafile | tname |...
1,913
Posted By RavinderSingh13
Hello Vedanta, Could you please try...
Hello Vedanta,

Could you please try following and let me know if this helps you.

awk -F'[ =/.]' 'BEGIN{print "Jobname...
1,913
Posted By RudiC
No. grep prints matching lines or patterns - it...
No. grep prints matching lines or patterns - it does not rearrange nor combine lines. And it doesn't print headers.
1,913
Posted By RudiC
Like so: awk ' NR == 1 {print...
Like so:
awk '
NR == 1 {print "Jobname \tType\ttype\tsqlname"
TYPE["d"] = "daily"
TYPE["w"] = "weekly"
next
}

...
891
Posted By anbu23
$ x=a.txt.gz $ echo .${x#*.} .txt.gz
$ x=a.txt.gz
$ echo .${x#*.}
.txt.gz
1,642
Posted By Chubler_XL
If you want uppercase for FILE_TYPE you may need...
If you want uppercase for FILE_TYPE you may need to call tr eg:

echo FILE_TYPE=${Y%%_*} | tr -s '[:lower:]' '[:upper:]' >> $FN
1,642
Posted By sam05121988
first of all echo is not required in for file...
first of all echo is not required in
for file in `echo $LIST_OF_FILES`just make sure you are in the same dir where the files are or use absoulte path and you can pass files to the loop as
for file...
1,030
Posted By anbu23
$ sed "s/[^_]*_\([^_]*\).*/\1/" file dat ...
$ sed "s/[^_]*_\([^_]*\).*/\1/" file
dat

meta
1,030
Posted By balajesuri
echo "xyz_dat_20110501_00000789.tar" | cut -d'_'...
echo "xyz_dat_20110501_00000789.tar" | cut -d'_' -f2
1,030
Posted By RudiC
Try:$ awk -F_ '{print $2}' file dat meta
Try:$ awk -F_ '{print $2}' file
dat

meta
Showing results 1 to 11 of 11

 
All times are GMT -4. The time now is 12:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy