I am a newbie in unix shell script. May I know how to write a bacth job to
read a list of files afrom the inout file and do the chmod ? Thanks.
i.e.
inside input.txt
a.txt
b.txt
c.txt
and I want to write a batch job to read the input .txt and do the chmod 755 for all 3 files in the input.txt
I don't understand - you stated in your other post about the exact same thing that you were going to use if statements - yet, you post the exact same question with no code. Either post the code you have been busy working on and questions about problems with it, or use the suggestions from the replies in your other post. Thanks.
kinmak, please read our rules and note in particular:
(4) Do not 'bump up' questions if they are not answered promptly. No duplicate or cross-posting and do not report a post where your goal is to get an answer more quickly.
I removed your duplicate post from that other thread.
Moderator: Any chance you could change the link to point to the proper location Partmaps.org -- you will notice that the 302 at netsonic.fi redirects to the same location (the redirector will go away, maybe soon).
bhargav's answer is the best (apart from the silly chmod 777, when 755 was specifically what was asked for in the first place) if you know the list of files is smallish; otherwise, you'll bump into the ARG_MAX limit. This is also described on the Awards page.
Thanks for your fixes (and sorry for taking so long to respond). Do you think you could revisit this, still? Looks like the link in this particular thread is not correctly formatted (can't remember if it always was broken) and also the first one in your list still seems to link to the old location.