Created
October 6, 2013 05:37
-
-
Save danijeljw/6849975 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function readName { | |
echo "Enter your full name:" | |
read fullName | |
clear | |
} | |
function cmprsName { | |
comp=${ echo "$fullName" } | sed 's/ //g'; | |
} | |
function sayItNow { | |
echo $comp | |
} | |
function allTogether { | |
readName | |
cmprsName | |
sayItNow | |
} | |
case $1 in | |
-h | --help ) allTogether | |
exit | |
;; | |
* ) echo "$0 -h" | |
exit 1 | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$fullName
$fullName
passed tosed
to remove spaces$comp
Changing
's/ //g'
to's/ /-/g'
will add dashes instead of removing spaces