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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the two files of crontab command?

652


Why are there shells on the beach?

589


Is powershell a bash?

588


What is bash shell command?

557


What are scripts in psychology?

588






When should shell programming/scripting not be used?

588


What are the different types of shell scripting?

532


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

509


What are the types of script?

613


Write a script to print the first 10 elements of fibonacci series.

1758


What is echo in shell?

632


Shifting positional parameter in Linux fedora core ? Hi I have written following shell script for display value of positional. But in 11th and 12 field will display without shifting command. May I know is it advance of Linux of programming code error? #!/usr/bin/bash echo "Bellow is the out of ps command" echo "`ps`" echo "The passing Parameter i.e output of \$1,2... value is:==> $11 " echo "Total number of passed argument \$# is:==> $#" echo "Passed argument names (\$*) are:==>$*" echo "This script PID(\$$) is :=>$$" echo "The name of executing script(\$0) is :==>$0" echo "The Parent ID of this script(\$PPID) is:==>$PPID" And my input to this script is ./scriptname arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9 arg10 arg11 arg12 Output Is Bellow is the out of ps command PID TTY TIME CMD 2892 pts/0 00:00:00 bash 3172 pts/0 00:00:00 positional_para 3173 pts/0 00:00:00 ps The passing Parameter i.e output of $1,2... value is:==> arg11 Total number of passed argument $# is:==> 13 Passed argument names ($*) are:==>arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9 arg10 arg11 arg12 arg13 This script PID($$) is :=>3172 The name of executing script($0) is :==>./positional_parameter The Parent ID of this script($PPID) is:==>2892 After the ps output please see the next line I.e $11 value comes out without shifting the parameter. How is it give me my friends

1752


What is the use of break command?

583


What are the various stages of a linux process it passes through?

624


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

559