Advertisement
kfirbarzilay

Untitled

Apr 7th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.71 KB | None | 0 0
  1. #test compile
  2. #!/bin/bash
  3.  
  4. gcc -Wall -o $2 $2 > $1 2>&1  
  5. if [[ -s  $1 ]]; then
  6.     echo Compile V
  7.     return 0;
  8. fi
  9. echo Compile X
  10. return 1;
  11.  
  12. #testInOut
  13. #! /bin/bash
  14. ($2 < $3 ) > $1
  15. if (( diff $1 $4 ))
  16.     echo InOut V
  17.     return 0;
  18. else
  19.     echo InOut X
  20.     return 1;
  21. fi
  22.  
  23. #testMem
  24. #! /bin/bash
  25. ($2 < $3 ) > $1
  26. if (( diff $1 $4 ))
  27.     echo InOut V
  28.     return 0;
  29. else
  30.     echo InOut X
  31.     return 1;
  32. fi
  33.  
  34. #testAll. just started it
  35. #! /bin/bash
  36. if [[ -d /logs ]]; then
  37.     echo Error: Dir exists. Exiting...
  38.     return 1;
  39. else
  40.     mkdir logs
  41. fi
  42. (( num=1 ))
  43. description=""
  44. while read line; do
  45.     #line_split=($line)
  46.     cut -f1 -d"@" > $description
  47.     echo $num:$decription
  48.     (( $num += 1 ))
  49. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement