fork download
  1. #!/bin/bash
  2. #
  3. # Linux Shell Scripting Tutorial 1.05r3, Summer-2002
  4. #
  5. # Written by Vivek G. Gite <vivek@nixcraft.com>
  6. #
  7. # Latest version can be found at http://w...content-available-to-author-only...t.com/
  8. #
  9. # Q1.Script to sum to nos
  10. #
  11.  
  12. if [ $# -ne 2 ]
  13. then
  14. echo "Usage - $0 x y"
  15. echo " Where x and y are two nos for which I will print sum"
  16. exit 1
  17. fi
  18. echo "Sum of $1 and $2 is `expr $1 + $2`"
  19. #
  20. # ./ch.sh: vivek-tech.com to nixcraft.com referance converted using this tool
  21. # See the tool at http://w...content-available-to-author-only...t.com/uniqlinuxfeatures/tools/
  22. #
  23.  
Runtime error #stdin #stdout 0.03s 5312KB
stdin
Standard input is empty
stdout
Usage - prog.sh   x    y
        Where x and y are two nos for which I will print sum