Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm going through a shell script coded by some old folks working on my current project. At the end of a file, it simple have the folder/file paths like,

/home/udhay-dev/work/udhay/bin/rm-vhosts
/home/udhay-dev/work/udhay/bin/vhosts
/home/udhay-dev/work/udhay/bin/apache

at the end of file. When these lines are executing, it throws

vhost.sh: line 22: /home/udhay-dev/work/udhay/bin/rm-vhosts: Is a directory
vhost.sh: line 23: /home/udhay-dev/work/udhay/bin/vhosts: Permission denied
vhost.sh: line 24: /home/udhay-dev/work/udhay/bin/apache: Is a directory

But i don't have any idea on these since i'm almost new to both Ubuntu and Shell script. What would be the reason or purpose for simply having those lines in a shell script? Please help.

share|improve this question
add comment

1 Answer 1

vhost.sh: line 22: /home/udhay-dev/work/udhay/bin/rm-vhosts: Is a directory

Shows there is directory named rm-vhosts inside /home/udhay-dev/work/udhay/bin directory.

vhost.sh: line 23: /home/udhay-dev/work/udhay/bin/vhosts: Permission denied

Shows there is file named vhosts inside /home/udhay-dev/work/udhay/bin directory.

vhost.sh: line 24: /home/udhay-dev/work/udhay/bin/apache: Is a directory

Shows there is directory named apache inside /home/udhay-dev/work/udhay/bin directory.

vhost.sh is the script name.line xx means the line number in the script which throws the above message.

share|improve this answer
    
What would be the reason for simply having those lines? –  Udhay May 7 at 9:42
    
just to say, it's a directory. But there is no use of having these lines on the script. –  Avinash Raj May 7 at 9:46
    
My guess is that the developer put those lines there in order to easily copy-and-paste them, but forgot to remove them. –  Jos May 7 at 10:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.