Advertisement
Guest User

Untitled

a guest
Jan 19th, 2020
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.54 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. function hello(){
  4.   echo "Hello"
  5.   echo "Hey there"
  6.   echo "Hi"
  7. }
  8.  
  9. function divider(){
  10.   echo "============================================================================="
  11. }
  12.  
  13. function change_string(){
  14.   string="$*"
  15.   upper="$(echo "$string" |tr "[:lower:]" "[:upper:]")"
  16.   lower="$(echo "$string" |tr "[:upper:]" "[:lower:]" )"
  17.  
  18.   echo "I changed your '$string' to '$upper' and '$lower'"
  19. }
  20.  
  21. hello
  22.  
  23. divider
  24.  
  25. change_string This is a string
  26. divider
  27. change_string Hello Andrew
  28. divider
  29. change_string Hey Buddy
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement