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
|
|
Yesterday at 10:17 pm by Thimmy
» Introduce yourself to the community - Topic 2
Yesterday at 10:05 pm by Thimmy
» Florentino Perez - man of mystery!
Yesterday at 7:43 pm by futbol_bill
» The Official Dwayne Wade <<<<<< you thread
Yesterday at 6:21 pm by El Gunner
» Serie A 2023/24
Yesterday at 3:15 pm by Warrior
» Modric considering one more year!
Yesterday at 10:34 am by Nivash
» Premier League 2023/24
Thu Apr 25, 2024 9:43 pm by Thimmy
» Real Refdrid, Real Uefadirt, different names, same schemes.
Thu Apr 25, 2024 6:10 pm by halamadrid2
» Political Correctness, LGBTQ, #meToo and other related topics
Thu Apr 25, 2024 12:54 pm by El Gunner
» Manchester United Part V / ETH Sack Watch
Thu Apr 25, 2024 8:47 am by Glory
» Bundesliga 2023/24
Thu Apr 25, 2024 5:19 am by BarcaLearning
» Quotes of Goallegacy
Thu Apr 25, 2024 1:20 am by Lord Awesome
» The TV Series Thread - Part 5
Wed Apr 24, 2024 8:09 pm by El Gunner