Search Results

Search: Posts Made By: nmoore2843
1,689
Posted By Yoda
Define an awk variable using shell variable:- ...
Define an awk variable using shell variable:-
color="Blue"

awk -F, -v COL="$color" '$2 == COL && $3 == "Yes" {c++} END{print c}' myfile.csv
1,689
Posted By Yoda
awk -F, '$2 ~ /Blue/ && $3 == "Yes" {c++} END...
awk -F, '$2 ~ /Blue/ && $3 == "Yes" {c++} END {print c}' myfile.csv
Showing results 1 to 2 of 2

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