I need help writing a linux script.. where can I go for online tutors??

Recommended Answers

All 7 Replies

You could better explain what you mean by, "linux script."

I need to write a shell script that..

Asks the user to input a file name and then tests to see if that
file exists.

If the file exists, then they should be told EXACTLY the following:

"Yes it's just where you thought it was. It's name is [filename]"


If the file does NOT exist, they they should be told EXACTLY:

Sorry, it's just not there. It's name was [filename]

... iam supposed to use if then else read scripts...
can you help me out ??


thanks
sara

hi....im gona send you what I have so far..can you see if im remotely on the right track


thanks
sara

#!bin/sh
#this program tests wheter a file exists or not
echo"enter a file"
if[-e $file]
then
echo"Yes it's just where you thought it was. It's name is [filename]"
elif [-e $file]
then
echo"Sorry, it's just not there. It's name was [filename]
fi


i am tryig to figure out how to put the read statements..what am i missing??
thanks

hi I am sahil
Just make a search in google with keyword "linux script + tutorial"
I hope u will find exactly what u need.
good luck
bye
sahil
keep in contact

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.