linksLast 316 B

1234567891011121314151617181920212223
  1. #! /bin/ksh
  2. #
  3. # Script to move all link refereces in a ".lst" file
  4. # to the end of the file.
  5. #
  6. USAGE="Usage: $0 file.lst"
  7. case $# in
  8. 0) echo $USAGE;;
  9. 1);;
  10. *) echo $USAGE;;
  11. esac
  12. awk '
  13. /hard_link|sym_link/ { links[i++] = $0 ; next; }
  14. { print $0 }
  15. END {
  16. if ( i > 0 )
  17. for ( i in links) print links[i];
  18. }
  19. ' $@