Visit Our UNIX and Linux User Community


Help me


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Help me
# 1  
Old 09-12-2013
Help me

hi,
i have 2 question.

1)In the following code snippet

Cmd> sh sample.sh

##sample.sh
##--------------------
#!bin/sh
echo $0

What will $0 return?
A) 0
B) 1
C) sample.sh
D) sample
E) All of the above


2)In the following code snippet

chmod 778 abcd.txt
if [ $? -ne 0 ]
then
echo "1234"
else
echo"456"
fi

What will be printed on the screen?
A) chmod
B) 778
C)1234
D) 456
# 2  
Old 09-12-2013
Thread closed since it looks very homework...
Unless you justify via pm that this is not you will have to repost in appropriate forum which has special rules:
Homework & Coursework Questions - The UNIX and Linux Forums
Please follow them when posting!

Previous Thread | Next Thread
Test Your Knowledge in Computers #68
Difficulty: Easy
Awk is abbreviated from the names of the developers - Aho, Weinberger, and Kernighan.
True or False?

Featured Tech Videos