Linux bash scripting
Page 1 of 1
Linux bash scripting
Hi guys...
any linux genius here who can help me how to write a shell script with following requirements
What directory would the user like a listing of?
What directory would the user like the output file to be stored in, remind the user that they will need write permission to the selected directory.
What should the output file be named?
in simple terms as possible.
much appreciated...
any linux genius here who can help me how to write a shell script with following requirements
What directory would the user like a listing of?
What directory would the user like the output file to be stored in, remind the user that they will need write permission to the selected directory.
What should the output file be named?
in simple terms as possible.
much appreciated...
Guest- Guest
Re: Linux bash scripting
also if u guys suggest any linux book for beginners.. would be much appreciated... the book that is used in our college is shit!!!!! everything is so mixed up and confusing... and incomplete.
Guest- Guest
Re: Linux bash scripting
Hm. I learned all my UNIX/Linux by doing.
I would like to help you, but for some reason I do not really understand what exactly you want to do with that script.
I would like to help you, but for some reason I do not really understand what exactly you want to do with that script.
rwo power- Super Moderator
- Club Supported :
Posts : 20978
Join date : 2011-06-05
Re: Linux bash scripting
rwo power wrote:Hm. I learned all my UNIX/Linux by doing.
I would like to help you, but for some reason I do not really understand what exactly you want to do with that script.
i would like to make a script that would ask a user to list directory they choose then storing in output file(this is not problem) and remind user about permission of selected directory.
i want to try to run it in my computer. this is part of the tutorial, and we will have similar tutorial coming up in class which will give me bonus credit.
i really need help because my book really sucks!!
Guest- Guest
Re: Linux bash scripting
Well, to list a directory and put the contents into a file, just use
to use it, just type
sh ./name-of-script DIRECTORY FILE
And behind the "echo" just write whatever text you want to write to remind the user. Or did I misunderstand what you want?
- Code:
ls -la $1 > $2
echo Here comes your text
to use it, just type
sh ./name-of-script DIRECTORY FILE
And behind the "echo" just write whatever text you want to write to remind the user. Or did I misunderstand what you want?
rwo power- Super Moderator
- Club Supported :
Posts : 20978
Join date : 2011-06-05
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
» Juve mercato - summer 2024
» The US Politics Thread
» The Utility Man - Nacho Fernandez
» Transfer Rumours | Tactics | Who to buy/sell etc
» Ligue 1 2023/24
» Women's General Football Discussion
» Barca 24/25 discussion
» La Liga '24/25
» General Games Discussion
» Premier League 2024/25
» Saudi Pro League '24-'25
» Olympics 2024