How u convert string "hi pravin how are you?" to
"Hi Pravin How Are You?"

Answer Posted / nachikethas

use a perl one liner like this

perl -e '$var="hi pravin how are you";@arr=split("
",$var);foreach $wrd(@arr){print ucfirst($wrd)." ";}'

Is This Answer Correct ?    8 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does it mean by #!/Bin/sh or #!/Bin/bash at the beginning of every script?

560


What is shell variable?

530


What is a scripting language simple definition?

560


What is the default ubuntu terminal?

624


Why should we use shell scripts?

593






write a shell script to check the failed jobs?

3958


How do I run a script from command prompt?

562


What does $@ mean in shell?

592


How to redirect both standard output and standard error to the same location?

635


What is the use of echo in shell script?

544


In my bash shell I want my prompt to be of format '$"present working directory":"hostname"> and load a file containing a list of user-defined functions as soon as I log in, how will you automate this?

639


What is shell prompt?

566


How can any user find out all information about a specific user like his default shell, real-life name, default directory, when and how long he has been using the system?

718


How does path variable work?

547


What are the advantages of shell script?

524