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
|
|
Today at 10:34 am by Nivash
» Florentino Perez - man of mystery!
Today at 10:28 am by Nivash
» The Official Dwayne Wade <<<<<< you thread
Today at 6:10 am by Vibe
» Premier League 2023/24
Yesterday at 9:43 pm by Thimmy
» Real Refdrid, Real Uefadirt, different names, same schemes.
Yesterday at 6:10 pm by halamadrid2
» La Liga 2023/24
Yesterday at 2:42 pm by BarcaLearning
» Political Correctness, LGBTQ, #meToo and other related topics
Yesterday at 12:54 pm by El Gunner
» Manchester United Part V / ETH Sack Watch
Yesterday at 8:47 am by Glory
» Serie A 2023/24
Yesterday at 8:43 am by rincon
» Bundesliga 2023/24
Yesterday at 5:19 am by BarcaLearning
» Quotes of Goallegacy
Yesterday at 1:20 am by Lord Awesome
» The TV Series Thread - Part 5
Wed Apr 24, 2024 8:09 pm by El Gunner
» Ligue 1 2023/24
Wed Apr 24, 2024 7:53 pm by BarcaLearning