what are special characters and explain how does text
varies by the usage of single quotes,double quotes and back
quotes?



what are special characters and explain how does text varies by the usage of single quotes,double ..

Answer / bichitra kumar

Special character like %,$,&,? are taken differently in
unix as they have some different meaning and use.

backslash (\) is used to mask the special meaning of these
special character immidietly following it.

example is grep 'hello\.gif' file
Here \ is used to mask . as it will show the hidden file in
unix directory.

Double Quotes( "" )-- Anything enclose in double quotes
removed meaning of that characters (except \ and $).

example: %echo "Today is date"
Today is date

Single quotes( '' )--Enclosed in single quotes remains
unchanged.

Back quote( `` )--To execute command

%echo "Today is `date`"
Today is Mon Aug 11 05:33:46 EDT 2008

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More Shell Script Interview Questions

write a shell script to emulate the Id command of PRIMOS which lists files and directories. It list files first with a header FILES and then directories with a header DIRECTORIES. This command has several options. The main ones are. -file select files only -dir select directories only -reverse sort in reverse order -no_header put no header on the output -brief output the header only -size display the size of each file -help display Id´s syntax and options.

0 Answers  


Which shell is the best?

0 Answers  


What is bourne shell scripting?

0 Answers  


What is batch file programming?

0 Answers  


How will you list only the empty lines in a file (using grep)?

4 Answers   ANZ,






Devise a script that takes file name as arguement(which must present in the current directory)and locates from your home directory tree all thpath names of its links.Then mail the list to self.

0 Answers  


What is computer cli?

0 Answers  


Why are shell scripts used?

0 Answers  


how can you execute the shell scripts?

4 Answers  


How to sort a result of Ls -l command based on columns. Ex. i want to sort 5th column from output of ls -l command.

6 Answers   TCS,


what is the difference between sh & bash shell?

1 Answers  


Explore about environment variables?

0 Answers  


Categories