首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

用sed下令模拟tac

2013-02-18 
用sed命令模拟tac原始数据cat dataThis is the header line.This is the first data line.This is the sec

用sed命令模拟tac
原始数据

cat data

This is the header line.
This is the first data line.
This is the second data line.
This is the last line.

tac data

This is the last line.
This is the second data line.
This is the first data line.
This is the header line.

sed -n  '{1!G;h;$p}' data

This is the last line.
This is the second data line.
This is the first data line.
This is the header line.

热点排行