freebsd-update's install_verify routine excessive stating
Christoph Mallon
christoph.mallon at gmx.de
Thu Jan 22 04:33:49 PST 2009
Oliver Fromme schrieb:
> > cut -f 2,7 -d '|' |
> > grep -E '^f' |
> > cut -f 2 -d '|' |
> > sort -u > filelist
>
> It's unclear why there are two "cut" commands. The 7th
> field isn't used at all. Also, the -E option to grep
After the first cut the seventh field becomes the second:
echo 'a|b|c|d|e|f|g' | cut -f 2,7 -d '|'
So the second cut selects the original seventh field and fills it into
the file "filelist".
>
> So I would suggest to replace the whole pipe with this:
>
> awk -F "|" '$2 ~ /^f/ {print $2}' "$@" |
> sort -u > filelist
It should print $7, see above.
Christoph
More information about the freebsd-hackers
mailing list