The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Shells dino_leix UNIX for Advanced & Expert Users 3 06-08-2005 03:07 AM
How many kinds of IPC are there in FREEBSD? cantona High Level Programming 1 08-12-2004 11:16 PM

Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-28-2008
Registered User
 

Join Date: Feb 2008
Posts: 1
different kinds of shells

Can anyone tell me about the classification and significance of variuos unix shells and why is only sh used for most shell scripting?
Forum Sponsor
  #2 (permalink)  
Old 02-28-2008
Part Time Moderator and Full Time Dad
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 758
this and this would be useful for you
  #3 (permalink)  
Old 02-28-2008
Registered User
 

Join Date: Feb 2008
Posts: 1
Thumbs down i need help with pleaseeeeeeeee anyone

Write a single bash shell script which does the following:
1. It accepts a single argument which can be either the string toupper or
the string tolower. If the argument given by the user is toupper, the script
will convert all of the names of the regular files (not directories) in the
current directory to uppercase. Thus, file file.txt will become FILE.TXT, file
Report.doc will become REPORT.DOC, etc.
If the argument provided to the script is the string tolower, the files in the
current directory will be renamed to the equivalent lower case ones. For
example, Report.doc will become report.doc, etc. If the script is given no
argument, then it will not try to rename any of the files in the current
directory.
(marks 30%).
2. The files in the current directory (whether their name has changed or not
in part 1), are moved to appropriate subdirectories, where the name of the
appropriate subdirectory is the extension of the file being moved. For
example, files report1.doc, report2.doc will be moved to a subdirectory
doc, with the names REPORT1.DOC, REPORT2.DOC (assuming the
script was called with the string toupper as argument.)
If the directory does not exist, it will be created by the script. If a file does
not have an extension it will not be moved to a subdirectory.
(marks 35%).
3. There is a possibility that when a file is moved to the appropriate
subdirectory, the subdirectory already contains a file with an identical
name. Modify the script so that if such a file already exists, the moved file
will be renamed by appending the number 1 (or the next unique integer) to
it. For example, if REPORT.DOC is moved to subdirectory doc, but there is
already a file REPORT.DOC inside doc, then the moved file will be
renamed as REPORT.DOC1. If a file REPORT.DOC1 already exists inside
doc, then the moved file will be renamed as REPORT.DOC2, and so on.
  #4 (permalink)  
Old 02-28-2008
vino's Avatar
Supporter (in vino veritas)
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,643
marriya,

Do not hijack a thread. Also no homework/classwork questions. That is against the rules. Closing this thread.

gurujoe, if you have any further questions related to your original post, please start a new thread.
Google UNIX.COM
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 07:39 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0