Category Archives: awk

PHPHOST BLOG

Web Hosting Related Articles You May Need

[one-liner]: Why is awk skipping the first line?

Background

I’ve used AWK for years but never had a reason to use it to split on anything except spaces until now. Hard to believe but I usually use sed to convert the separator characters to spaces.

1
2
# sed example
echo "this|is|a|string" | sed ‘s/|/ /g’

So I was trying to use AWK’s field separator variable, FS but […] Continue reading

Posted in awk, one-liner, shell, Syndicated, sysadmin, tips & tricks | Comments Off on [one-liner]: Why is awk skipping the first line?