Danh Trịnh
New member
How do I get the first column in Unix?
Answer
Just put both column references next to each other.
Answer
Just put both column references next to each other.
- cat logfile | sed ‘s/|/ /’ | awk ‘{print $1, $8}’
- sed ‘s/|/ /’ logfile | awk ‘{print $1, $8}’
- awk -F ‘|’ ‘{print $1, $8}’ logfile.
- awk -F ‘|’ ‘{print $1, $NF}’ logfile.