MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

UNIX

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which symbol is used as a command prompt in unix?
A
!
B
@
C
$
D
#
Explanation: 

Detailed explanation-1: -The $ symbol is the default for regular users. If you’re logged in as the ‘root’ user, the full prompt changes to [rootlocalhost  ]#. The # symbol is the prompt designation for the root account. The general format of the default command prompt is: [usernamehostname cwd]$ or #.

Detailed explanation-2: -Syntax for this manual. Remember the UNIX/LINUX command line is case sensitive! “$” indicates start of command. “#” indicates end of command and start of comment.

Detailed explanation-3: -The Unix operator “$” can be used to access the value of a variable or command. This can be especially useful in conjunction with the cat command to include the contents of a file in another Unix command.

Detailed explanation-4: -The return value of a command is stored in the $? variable. cmd; echo $?; The return value is called exit status. This value can be used to determine whether a command completed successfully or unsuccessfully.

Detailed explanation-5: -$ (dollar underscore) is another special bash parameter and used to reference the absolute file name of the shell or bash script which is being executed as specified in the argument list. This bash parameter is also used to hold the name of mail file while checking emails. $

There is 1 question to complete.