Chinaunix首页 | 论坛 | 博客
  • 博客访问: 916627
  • 博文数量: 75
  • 博客积分: 1216
  • 博客等级: 少尉
  • 技术积分: 1998
  • 用 户 组: 普通用户
  • 注册时间: 2012-08-11 16:20
个人简介

优秀是一种习惯

文章分类

全部博文(75)

文章存档

2014年(1)

2013年(29)

2012年(45)

分类: Python/Ruby

2012-10-09 10:56:08

awk '{a[NR]=$0}END{for (i=NR;i>=1;i--)print a[i]}' file



  1. [root@station1 ~]# cat file
  2. postfix:x:89:89::/var/spool/postfix:/sbin/nologin
  3. avahi:x:70:70:Avahi mDNS/DNS-SD Stack:/var/run/avahi-daemon:/sbin/nologin
  4. ntp:x:38:38::/etc/ntp:/sbin/nologin
  5. rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
  6. nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
  7. sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
  8. mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash
  9. pulse:x:496:494:PulseAudio System Daemon:/var/run/pulse:/sbin/nologin
  10. gdm:x:42:42::/var/lib/gdm:/sbin/nologin
  11. tom:x:500:500:tom:/home/tom:/bin/bash
  12. [root@station1 ~]# awk '{a[NR]=$0}END{for (i=NR;i>=1;i--)print a[i]}' file
  13. tom:x:500:500:tom:/home/tom:/bin/bash
  14. gdm:x:42:42::/var/lib/gdm:/sbin/nologin
  15. pulse:x:496:494:PulseAudio System Daemon:/var/run/pulse:/sbin/nologin
  16. mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash
  17. sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
  18. nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
  19. rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
  20. ntp:x:38:38::/etc/ntp:/sbin/nologin
  21. avahi:x:70:70:Avahi mDNS/DNS-SD Stack:/var/run/avahi-daemon:/sbin/nologin
  22. postfix:x:89:89::/var/spool/postfix:/sbin/nologin
  23. [root@station1 ~]#

阅读(1411) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

pybmsk2012-11-03 16:36:22

PTC Creo 2.0 M010 Full Multilanguage WinALL-ISO 2DVD

PTC Creo/Illustrate (ex PTC IsoDraw) 2.0 WinALL-ISO 1DVD

PTC Creo Schematics (ex Routed Systems Designer) 2.0 M010-ISO 1CD

PTC Pro/E WildFire+Pro/Mechancia v6.0 Alpha Win32-ISO 3CD

PTC Creo Elements/Pro 5.0 M070 Working for Win32-ISO 1DVD(最新多语言正式版包括简、繁体中文)

PTC Creo Elements/Pro 5.0 M070 Working for Win64-ISO 1DVD

PTC Creo Elements View (ex Product View) v