Search Results

Search: Posts Made By: tinufarid
1,249
Posted By SriniShoo
SS_[0-9]*_[0-9]*.zip
SS_[0-9]*_[0-9]*.zip
1,249
Posted By RudiC
How about ls SS_[0-9]*.zip You may need to...
How about ls SS_[0-9]*.zip You may need to refine the pattern.
3,005
Posted By bartus11
Try: awk -F\; '{x=$1 FS $2 FS $3;for...
Try: awk -F\; '{x=$1 FS $2 FS $3;for (i=4;i<=NF;i++){print x FS $i}}' input_file
3,005
Posted By vgersh99
nawk -F';' '{head=($1 OFS $2 OFS $3);...
nawk -F';' '{head=($1 OFS $2 OFS $3); for(i=4;i<=NF;i++) print head,$i}' OFS=';' myFile
28,104
Posted By jim mcnamara
file1=somefile.txt file2=anotherfile.txt ...
file1=somefile.txt
file2=anotherfile.txt
resultfile=somefile_minus_anotherfile.txt

awk -v file1="$file1" -v file2="$file2"
FILENAME==file1 { arr[$0]++}
FILENAME==file2 { if...
47,827
Posted By ghostdog74
sed -i '1i add here' file*bat
sed -i '1i add here' file*bat
28,104
Posted By jim mcnamara
awk ' FILENAME=="file1" { arr[$0]++} ...
awk '
FILENAME=="file1" { arr[$0]++}
FILENAME=="file2" { if (arr[$0]==0) {print $0} }
' file1 file2 > file2minusfile1.txt

will give file2 minus file1, i.e., data in file2 that...
109,531
Posted By muthukumar
You can try as, 00 23 * * * [[ $(date +'%d')...
You can try as,

00 23 * * * [[ $(date +'%d') -eq $(cal | awk '!/^$/{ print $NF }' | tail -1) ]] && job 1>/dev/null 2>&1

hth.

Code tags please, thanks.
109,531
Posted By vgersh99
to be ran at 11pm on the last day of a month: ...
to be ran at 11pm on the last day of a month:

00 23 * * *[ `date +%d` -eq `echo \`cal\` | awk '{print $NF}'` ] && myJob.sh
Showing results 1 to 9 of 9

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