Search Results

Search: Posts Made By: ghostdog74
3,717
Posted By ghostdog74
awk -F"," 'NR==1{n=NF}NF<=n{n=NF}END{print n}'...
awk -F"," 'NR==1{n=NF}NF<=n{n=NF}END{print n}' file
3,717
Posted By ghostdog74
bash IFS="," read -a arr <"file" ...
bash

IFS="," read -a arr <"file"
t=${#arr[@]}
while IFS="," read -a line
do
n=${#line[@]}
[ "$n" -lt "$t" ] && t="$n"
done < "file"
echo "lowest count: $t"
Showing results 1 to 2 of 2

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