New to Shell Script
Hey guys, I'm new to this website and new to shell scripting. I'm currently in a C/Unix class learning, well C and Unix. Currently we have an assignment that we are working on:
Quote:
|
Sure, we're not goin to finish your homework ;)
Apart joking, you should better go through some shell scripting stuff so you can make some basic understanding. In order to accomplish your task, read usage of "find" command and about simple/advanced filers like, grep, cut, sed etc. Further, file size can be found using "find" or "du" commands. Let me know how else I can help you.. |
See;
http://www.freeos.com/guides/lsst/ http://www.linux-tutorial.info/modul...tent&pageid=33 For starters... |
Quote:
Let's go step by step: Quote:
Code:
if ! [[ "$1" =~ ^[0-9]+$ ]] ; then Quote:
Quote:
Quote:
http://tldp.org/LDP/abs/html/ |
In addition to TB0ne's link I would add the following one to use along side it:
http://mywiki.wooledge.org/TitleIndex |
See faq #3 from the above for some tips on sorting the file list by various properties.
How can I find the latest (newest, earliest, oldest) file in a directory? http://mywiki.wooledge.org/BashFAQ/003 Also pay special attention to the pitfalls section. And as mentioned, you'll probably need to use find. Check out the -maxdepth option in particular. http://mywiki.wooledge.org/UsingFind http://www.grymoire.com/Unix/Find.html |
Thanks for all the help fellas. I am reading over the stuff now, I will update you guys with all the stuff that I can. I'm thinking that I might have to skip this assignment due to lack of time....I'll let you guys know. If I could get someone to show me the results later tonight that would help. Not worried about the points just want to see the solution.
|
Quote:
|
All times are GMT -5. The time now is 03:56 PM. |