01-09-2012
The paths end with /enviornment/application_code.
So it could be /..../Prod/XX, /PROD/xx, /prod/Xx, whatever whoever created the folders felt like naming them. Also beneath them are Main or main or MAIN, and beneath that too - Scr, SCR, scr....
Then I might be supplied those same folder names as parameters in different combos.. and even if not, even if I always get the parameters in the same case, I still need to find out in what case exactly that folder is written in, because I need to transfer files there. Otherwise I would've used a lower case comparison like you suggested Corona688.
birei, so I can I use the code I wrote (I mean the same logic), but replace the whole opendir->while loop, with a grep?
Worst case scenario I'll give the users the responsibility (since they are in charge of whatever's in those directories) to find out how the folders are written and make sure the names they supply the script and the actual names correspond, themselves...
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Greetings & Happy New Years To All!
A client of mine FTP'ed their files up to the server and it all ended up being in UPPERCASE when it all should be in lowercase. Is there a builtin command or a script anyone knows of that will automagically convert all files to lowercase?
Please advise asap... (4 Replies)
Discussion started by: webex
4 Replies
2. Shell Programming and Scripting
Trying to create a script in BASH that would ask the user to enter another user name making sure the input is not blank before they hit enter then to check the home directory of that user does exist, I have the check folder sorted it's just the loop to make sure the user has entered chars (5 Replies)
Discussion started by: MBN
5 Replies
3. AIX
Inside a script I have 2 variables COMP=cy and PT=t. further down the same script I require at the same line to call those 2 variables the first time uppercase and after lowercase ${COMP}${PT}ACE,${COMP}${PT}ace. Can somebody help me
Thanks in advance
George Govotsis (7 Replies)
Discussion started by: ggovotsis
7 Replies
4. UNIX for Dummies Questions & Answers
i have no variable and no file
i just want to convert AJIT to ajit
with some command in UNIX
can anybody help (4 Replies)
Discussion started by: ajit.yadav83
4 Replies
5. Shell Programming and Scripting
hi,
i need to write a bash script that does two things.
the program will take from the command line a file name, which is a C code, and an integer, which is the size of my indentation
i would then have to indent every nested code by the number of columns provided by the user in the... (1 Reply)
Discussion started by: kratos.
1 Replies
6. UNIX Desktop Questions & Answers
I just started to learn unix...
and i needed to make a basic script.
i need to
1. read a file (.txt)
2. count the words of EVERY sentece
3. sentences with odd number of words need to be converted into lowercase
sentences with even number of words need to be converted into uppercase
... (6 Replies)
Discussion started by: chilli1988
6 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
i have a file and i want to convert all uppercase letters to lowercase letters which are in my file.
how can i do this.
Thanx (3 Replies)
Discussion started by: temhem
3 Replies
8. UNIX for Dummies Questions & Answers
I'm trying to set up a script that takes user input and validates that the user input was entered correctly.
So far I have this:
while :
do
echo "Please enter your name."
read NAME
if
then
echo "You have not entered a name."
echo... (13 Replies)
Discussion started by: fufaso
13 Replies
9. Shell Programming and Scripting
Hi,
how to convert user input (lowercase) to uppercase in the dos batch file ?
echo.
SET /p user1=Enter username:
SET user2=%user1%V
echo.
echo %user1%
echo.
echo %user2%
echo.
With Regards (7 Replies)
Discussion started by: milink
7 Replies
10. Shell Programming and Scripting
Hello,
I have a list of files in a directory whose names are all in uppercasse, including the file format for eg *.MP3 . I would like to convert these to the normal way we write it ie ABC.MP3 to be converted to Abc.mp3 . I know that this can be done manually by using a lot of "mv" or rename... (6 Replies)
Discussion started by: ajayram
6 Replies
UUCP(1) General Commands Manual UUCP(1)
NAME
uucp - unix to unix copy
SYNOPSIS
uucp [ -acCdfmr ] [ -nuser ] [ -ggrade ] [ -sspool ] [ -xdebug ] source-file.... destination-file
DESCRIPTION
Uucp copies files named by the source-file arguments to the destination-file argument. A file name may be a pathname on your machine, or
may have the form
system-name!pathname
where `system-name' is taken from a list of system names that uucp knows about. Shell metacharacters ?*[] appearing in the pathname part
will be expanded on the appropriate system.
Pathnames may be one of:(1) a full pathname;
(2) a pathname preceded by ~user; where user is a userid on the specified system and is replaced by that user's login directory;
(3) a pathname prefixed by ~, where ~ is expanded into the system's public directory (usually /usr/spool/uucppublic);
(4) a partial pathname, which is prefixed by the current directory.
If the result is an erroneous pathname for the remote system, the copy will fail. If the destination-file is a directory, the last part of
the source-file name is used.
Uucp preserves execute permissions across the transmission and gives 0666 read and write permissions (see chmod(2)).
The following options are interpreted by uucp.
-a Avoid doing a getwd to find the current directory. (This is sometimes used for efficiency.)
-c Use the source file when copying out rather than copying the file to the spool directory. (This is the default.)
-C Copy the source file to the spool directory and transmit the copy.
-d Make all necessary directories for the file copy. (This is the default.)
-f Do not make intermediate directories for the file copy.
-ggrade
Grade is a single letter/number; lower ASCII sequence characters will cause a job to be transmitted earlier during a particular con-
versation. Default is `n'. By way of comparison, uux(1C) defaults to `A'; mail is usually sent at `C'.
-m Send mail to the requester when the copy is complete.
-nuser Notify user on remote system (i.e., send user mail) that a file was sent.
-r Do not start the transfer, just queue the job.
-sspool
Use spool as the spool directory instead of the default.
-xdebug
Turn on the debugging at level debug.
FILES
/usr/spool/uucp - spool directory
/etc/uucp/* - data and configuration files
SEE ALSO
uux(1C), mail(1)
D. A. Nowitz and M. E. Lesk, A Dial-Up Network of UNIX Systems.
D. A. Nowitz, Uucp Implementation Description.
WARNING
The domain of remotely accessible files can (and for obvious security reasons, usually should) be severely restricted. You will very
likely not be able to fetch files by pathname; ask a responsible person on the remote system to send them to you. For the same reasons you
will probably not be able to send files to arbitrary pathnames.
BUGS
All files received by uucp will be owned by the uucp administrator (usually UID 5).
The -m option will only work sending files or receiving a single file. (Receiving multiple files specified by special shell characters
?*[] will not activate the -m option.)
At present uucp cannot copy to a system several "hops" away, that is, a command of the form
uucp myfile system1!system2!system3!yourfile
is not permitted. Use uusend(1C) instead.
When invoking uucp from csh(1), the `!' character must be prefixed by the `' escape to inhibit csh's history mechanism. (Quotes are not
sufficient.)
Uucp refuses to copy a file that does not give read access to ``other''; that is, the file must have at least 0444 modes.
7th Edition April 24, 1986 UUCP(1)