Oracle Discussion Forums
Welcome, Guest. Please login or register.
September 10, 2010
Home Help Search Login Register
News:


+  WebForums - OraclePassport
|-+  IT Programming - UNIX, Java, MySQL, Toad
| |-+  Unix Programming
| | |-+  UNIX Questions and Answers
| | | |-+  1. Unix common interview questions, $$, $#, $*, $?
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Send this topic Print
Author Topic: 1. Unix common interview questions, $$, $#, $*, $?  (Read 956 times)
dtech-team
Administrator
Assistant Professor
*****

Appreciate? +5/-0
Offline Offline

Posts: 616


DTecH Oracle Forums

WWW
« on: May 08, 2009 »

Few Interview questions:

1. What does these indicate in UNIX?

$$
$?
$*
$#
$1
Report to moderator   Logged

dtech-team
Administrator
Assistant Professor
*****

Appreciate? +5/-0
Offline Offline

Posts: 616


DTecH Oracle Forums

WWW
« Reply #1 on: May 22, 2009 »

Really forgot this one:

$?  - shows the status of the previsously executed command. (Success - 0, fail >0)

$* - gives the list of all input parameters to a shell script

$# -gives the total number of input parameters to a shell script
 
$1 - gives the value of first input, $2 gives second input and so on...

$$ -- Process number of current shell
« Last Edit: March 19, 2010 by sippsin » Report to moderator   Logged

devtakh
Developer
***

Appreciate? +1/-0
Offline Offline

Posts: 41


« Reply #2 on: May 27, 2009 »

To add on the list

$0 - name of the executed command/script
$@ - same as $* except when enclosed in double quotes
$! -pid of the last backgnd process.
Report to moderator   Logged

cheers,
Devaraj Takhellambam
PROFESSOR
dtech-team
Administrator
Assistant Professor
*****

Appreciate? +5/-0
Offline Offline

Posts: 616


DTecH Oracle Forums

WWW
« Reply #3 on: May 27, 2009 »

Hi Dev, Thanks yaar..

Our Unix professor is back !!!  ;D
Report to moderator   Logged

dtech-team
Administrator
Assistant Professor
*****

Appreciate? +5/-0
Offline Offline

Posts: 616


DTecH Oracle Forums

WWW
« Reply #4 on: March 19, 2010 »

More: http://baishui.info/orelly/unix/unixnut/ch05_03.htm
Report to moderator   Logged

Pages: [1] Go Up Send this topic Print 
« previous next »
 
Share this topic...
In a forum
(BBCode)
In a site/blog
(HTML)



Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 2.0 RC1.2 | SMF © 2006–2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.529 seconds with 21 queries.