This document discusses the awk command and how it can be used to parse and extract data from text files and output. Awk allows specifying patterns to match and actions to perform on matches. Examples show using awk to extract specific fields from the /etc/passwd file and Apache log files. Pipelines combining awk with other commands like grep, sed and cut are demonstrated.
5. • last
chenggan pts/467 192.168.130.29 Thu Aug 18 15:39 still logged in
chenggan pts/446 192.168.130.29 Thu Aug 18 15:38 still logged in
chenggan pts/414 192.168.130.29 Thu Aug 18 15:33 still logged in
chenggan pts/414 192.168.130.29 Thu Aug 18 15:26 - 15:32 (00:06)
lixinhe pts/413 192.168.130.34 Thu Aug 18 15:25 still logged in
lixinhe pts/521 192.168.130.34 Thu Aug 18 15:09 still logged in
xuzhang pts/509 192.168.129.2 Thu Aug 18 15:03 still logged in
18. insert into dealrevisit value (967898," ",13681190863,10,0,UNIX_TIMESTAMP());
insert into dealrevisit value (582907," ",13901316805,10,0,UNIX_TIMESTAMP());
insert into dealrevisit value (734974," ",15010372631,10,0,UNIX_TIMESTAMP());
insert into dealrevisit value (868768," ",18600011579,10,0,UNIX_TIMESTAMP());