Advertisement
Guest User

Untitled

a guest
Feb 12th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. function check()
  2. {
  3. if[$# != 4]then
  4. echo "Error, need 4 parameters"
  5. fi
  6.  
  7. arg1=$1
  8. arg1="{print \$${arg1}}"
  9. arg2="/etc/$2"
  10. arg3="^$3"
  11. arg4=$4
  12. echo $arg1 $arg2 $arg3 $arg4
  13. commandLine="awk -F':' $arg1 $arg2 |grep $arg3 > $arg4"
  14. echo $commandLine
  15. #awk -F":" $commandLine1 $commandeLine2 | grep $commandLine3 > $commandLine4
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement