I have a command that I use to transform sentences to title case. It is inefficient to have to copy this command out of a text file, and then paste it into the terminal before then also pasting in the sentence I want converted. The command is:
echo "my text" | sed 's/.*/\L&/; s/[a-z]*/\u&/g'
How can I convert this to a script so I can just call something like the following from the terminal:
TitleCaseConverter "my text"
Is it possible to create such a script? Is it possible to make it work from any folder location?