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

Answer Posted / padmakumar

The file "test" contains "hi pravin how are you?".

sed -e "s/^[a-z]/\U&/" -e "s/[[:space:]][a-z]/ \U&/g" test

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an inode block?

582


Is shell a scripting language?

578


Is shell and terminal the same?

599


What is awk script?

550


What is an sh file?

565






one folder contains lot of students name but I want to fetch hello with every student name individually using shell script

524


What is shell prompt?

568


What is a file basename?

599


Why is shell scripting important?

580


What are the advantages of shell script?

529


How will you pass and access arguments to a script in linux?

598


What is the default ubuntu terminal?

627


How do I save a powershell script?

568


Suppose you execute a command using exec, what will be the status of your current process in the shell?

593


How do I run a script from command prompt?

566