Search Results

Search: Posts Made By: TheStruggle
2,937
Posted By RudiC
Try awk '{X=substr($1,1,4); gsub...
Try awk '{X=substr($1,1,4); gsub (/[A-Za-z]/,"",X); print > ("test" X ".csv")}' file
2,937
Posted By RudiC
It creates the requested output file name for the...
It creates the requested output file name for the redirection from two constants and the 3 chars (2,3,4) from your data line.
2,937
Posted By RudiC
Try awk '{print >("test" substr($1,2,3) ".csv")}'...
Try awk '{print >("test" substr($1,2,3) ".csv")}' file
3,400
Posted By RudiC
OK, to cut a seemingly open ended story short,...
OK, to cut a seemingly open ended story short, try awk -F, '{split ($6, T, " "); if (T[1] > 20 && T[2] == "d") print $0}' file
M155POD072,iOS 8.2,iPod touch 5th gen,6.3,CCQM129ZF4K1,31 d 3...
3,400
Posted By vgersh99
$4 is the forth field. The field separator is...
$4 is the forth field. The field separator is specified by -F'[, ]' . So it's either a comma or a space. Now look at your sample data ;)
Showing results 1 to 5 of 5

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