Search Results

Search: Posts Made By: Scott
3,843
Posted By Scott
-v declares a variable to use inside awk. You...
-v declares a variable to use inside awk. You could also put that at the end, without -v. e.g.

awk -vd=`date +%Y%m%d` -F"," '{print $1, d}' OFS="," file
3,843
Posted By Scott
What is wrong with the result ("didn't get the...
What is wrong with the result ("didn't get the result as expected)?

$ sed "s/$/,$(date '+%Y%m%d')/" file
22055,20180930
21088,20180930
93840,20180930
30990,20180930
50990,20180930...
Showing results 1 to 2 of 2

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