Awk+print, create file if not exixt
I having the following awk line in a script, is it possible to modify the script so that it create a the directory if it dosnt exist (similar to mkdir -p)
awk -v datum="$DATUM" -v workingdir="$workingdir" '{ sub("\\[.*","",$5); print > workingdir"/"datum "/" $5;}' $1 |
Try this:
Code:
awk -v datum="$DATUM" -v workingdir="$workingdir" ' |
All times are GMT -5. The time now is 06:25 PM. |