DISPLAY THE LIST OF PATTERNS

SOURCE CODE:
echo "Display list of files"
echo "1)Display files with .c extension"
echo "2)Display special character"
echo "3)Displaying list of files by specifying starting character"
echo "choice"
read a
case $a in
1)echo "List.c files"
ls -l *.c;;
2)echo "Displaying special character"
echo \!\#\@\$\%\^\&;;
3)echo "Displaying list of files by specifying starting character"
read s
echo ls $s*;;
*)echo "invvalid"
esac

OUTPUT:
[examuser35@localhost Jebastin]$ sh patterns.sh
Display list of files
1)Display files with .cextension
2)Display special character
3)Displaying list of files by specifying starting character
choice
2
Displaying special character
!#@$%^&

[examuser35@localhost Jebastin]$ sh patterns.sh
Display list of files
1)Display files with .cextension
2)Display special character
3)Displaying list of files by specifying starting character
choice
3
Displaying list of files by specifying starting character
f
fcfs.c file.c file.sh fib.sh fact.sh
Previous
Next Post »

If you still didn't find what you're looking for, you can search this website below: