Advertisement
Guest User

Untitled

a guest
Oct 26th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. AWK=awk
  2. GREP=grep
  3.  
  4. if [ $(uname -s) == "SunOS" ]
  5. then
  6. AWK=/usr/bin/nawk
  7. GREP=/usr/xpg4/bin/grep
  8. fi
  9.  
  10. if $GREP -q whatever /some/file
  11. then
  12. $AWK -F: '{....}' /some/file
  13. fi
  14.  
  15. PATH=$(getconf PATH):$PATH
  16.  
  17. PATH=`getconf PATH`:$PATH
  18.  
  19. PATH=~/bin:`getconf PATH`:$PATH
  20.  
  21. set path = ( ~/bin `getconf PATH` $path)
  22.  
  23. mkdir -p ~/bin
  24. cd ~/bin
  25. cat > awk <<%
  26. #!/bin/sh
  27. PATH=`getconf PATH`:$PATH awk "$@"
  28. %
  29. ln -s awk nawk
  30. ln -s awk gawk
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement