All Questions
2
questions
8
votes
4
answers
49k
views
using awk to split a line on single spaces not multiples
I'm trying to split a line that I have no control over the format of. If parameter 7 and 8 are missing which is possible they will be replaced by a space so I would end up with,
field1 field2 field3 ...
2
votes
2
answers
137
views
Awk not rendering any result
My goal is to get the file created in the current month in a directory.
It seems that the command is correct but not rendering any result:
Date=`date '+%b'`
echo $Date
Oct
ls -l | awk -v d="$Date" ...