GTU OS Program - 14 AWK program

14. Write an awk program using function, which convert each word in a given text into capital.

First of all what is awk ?

Awk is a utility that enables a developer to write small but effective programs in the form of statments. Using awk we can scan a file line by line, transform data files, compare input lines to a defined pattern, etc.

Complete code of the program

read -p "Enter a lowercase String : " string
echo "Resultant Upercase string is : "
echo "$string" | awk '{print toupper($0)}'

Interpreting the upper.sh file and executing it in terminal

tkanu025@hp:~/lab_solutions$ chmod +x upper.sh
tkanu025@hp:~/lab_solutions$ ./upper.sh
Output
gtu study material for free cse gtu study material for gtu engineering studnets

gtu os lab manual,

os GTU Practical,

operating system Programs,

Operating system shellscript programs,

Gtu study material 3140705,

OS 3140702,

os practical list,

shell script programming,

gtu os practical,

os lab solution gtu

aWK program which converts small case letters into capital

Comments

YouTube

Popular posts from this blog

GTU OOP Program - 18

GTU OS Program - 7

GTU OS Program - 3