Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Create a script that moves files you've downloaded from directory to destination. The script should take two arguments: from and to. The categories could be files with the following characters as the file name's first letters (case insensitive): A to F, G to L, M to R, S to Z. and "-" for the rest. Each of these categories should be represented as a directory in the destination and creation of these directories should be done interactively (Hint: command "read"). However, ask for creation of these subdirectories only if the destination directory itself exists. If it doesn't exists, create an error report and exit prematurely. Check also the existence of the "from" directory and the number of arguments.
Create a script that moves files you've downloaded from directory to destination. The script should take two arguments: from and to. The categories could be files with the following characters as the file name's first letters (case insensitive): A to F, G to L, M to R, S to Z. and "-" for the rest. Each of these categories should be represented as a directory in the destination and creation of these directories should be done interactively (Hint: command "read"). However, ask for creation of these subdirectories only if the destination directory itself exists. If it doesn't exists, create an error report and exit prematurely. Check also the existence of the "from" directory and the number of arguments.
Sounds like a homework assignment.
We can help, but we are NOT going to do your assignment for you. Show us what you have, and we might make suggestions.
Create a script that moves files you've downloaded from directory to destination. The script should take two arguments: from and to. The categories could be files with the following characters as the file name's first letters (case insensitive): A to F, G to L, M to R, S to Z. and "-" for the rest. Each of these categories should be represented as a directory in the destination and creation of these directories should be done interactively (Hint: command "read"). However, ask for creation of these subdirectories only if the destination directory itself exists. If it doesn't exists, create an error report and exit prematurely. Check also the existence of the "from" directory and the number of arguments.
Hi eloradas and welcome to LQ.
Please review the Site FAQ as well as the LQ Rules for further information about what other members are saying to you. LQ and the members are not here to provide on call support or provide free support for questions. Instead LQ is here to help you to learn more about Linux. Therefore showing your effort with this is important. Further, without having shown any of your effort, LQ members cannot know what script language you are using, what environment you have, or what existing knowledge level you have with scripting, therefore any answers they may offer would potentially be incorrect advice.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.