Advertisement
soulrpg

Bash_1

May 27th, 2019
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.84 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. case $1 in
  4.    joined)
  5.       shift 1
  6.       printf "$1"
  7.       shift 1
  8.       for napis in $@
  9.       do
  10.          printf $1
  11.          shift 1
  12.       done
  13.       echo ""
  14.       ;;
  15.    underline)    
  16.       shift 1
  17.       printf "$1"
  18.       shift 1
  19.       for napis in $@
  20.       do
  21.          printf "_$1"
  22.          shift 1
  23.       done
  24.       echo ""
  25.       ;;
  26.    uppercase)
  27.       shift 1
  28.       printf "$1" | tr [a-z] [A-Z]
  29.       shift 1
  30.       for napis in $@
  31.       do
  32.          printf " $1" | tr [a-z] [A-Z]
  33.          shift 1
  34.       done
  35.       echo ""
  36.       ;;
  37.    dashes)
  38.       shift 1
  39.       printf "$1"
  40.       shift 1
  41.       for napis in $@
  42.       do
  43.          printf "-$1"
  44.          shift 1
  45.       done
  46.       echo ""
  47.       ;;
  48.    *)
  49.       echo "Zla komenda! Dostepne formaty: joined, underline, uppercase, dashes"
  50.       ;;
  51. esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement