Sponsored Content
Top Forums Shell Programming and Scripting Validating uppercase/lowercase of user input with perl compared to unix folders Post 302588556 by birei on Monday 9th of January 2012 10:15:45 AM
Old 01-09-2012
Hi Furou,

Strange issue if I understood correctly. Names in Unix (most of them at least) are case sensitive, so users should provide the correct name and not leave you the job of searching for the correct one.

What about if the user gives you 'myFolder' and there are two of them, one 'myfolder' and other MYFOLDER?

I would use the grep() function instead open each dir and read all its contents.

Regards,
Birei
This User Gave Thanks to birei For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

uppercase to lowercase

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

Validating user input is not blank

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

Lowercase to Uppercase

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

uppercase to lowercase

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

indentation and lowercase to uppercase

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

Unix: lowercase to uppercase

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

UPPERCASE to lowercase

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

Validating user input

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

how to convert user input to uppercase

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

Uppercase to lowercase

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
roar_vs_stream(3)					   RoarAudio Programmer's Manual					 roar_vs_stream(3)

NAME
roar_vs_stream - Set up stream parameters for VS object SYNOPSIS
#include <roaraudio.h> int roar_vs_stream(roar_vs_t * vss, const struct roar_audio_info * info, int dir, int * error); DESCRIPTION
This function asks a VS object opened by roar_vs_new_from_con(3) or roar_vs_new(3) to open the data connection using the audio parameters info and the stream direction dir. This function needs to be called before data is read or written if one of the above functions is used to create the VS object. This function is also used to provide parameters for the file mode (which is started by using roar_vs_file(3) or roar_vs_file_simple(3)). To play back a file this is not needed in a common case as the VS API tries to find correct parameters. It is required for all other stream directions. See roar_vs_file(3) and roar_vs_file_simple(3) for more information. On failture this function can be called again with diffrent parameters. PARAMETERS
vss The VS object to be updated. info This is a pointer to the roar_audio_info structure storing the audio format parameters. The structure contains the following meme- bers: rate (sample rate), bits (bits per sample), channels (channels per frame) and codec. dir This is the stream direction. Common values include ROAR_DIR_PLAY for waveform playback, ROAR_DIR_MONITOR for waveform monitoring, ROAR_DIR_RECORD for waveform recording. For MIDI ROAR_DIR_MIDI_IN and ROAR_DIR_MIDI_OUT is used. error This is a pointer to a integer used to store the error value in case of error. This can be NULL if not used but it is very recom- mended to use this error value to report good error messages to the user. RETURN VALUE
On success these calls return 0. On error, -1 is returned. EXAMPLES
struct roar_audio_info info; int err; if ( roar_profile2info(&info, "isdn-eu") == -1 ) { // error handling. } if ( roar_vs_stream(vss, &info, ROAR_DIR_PLAY, &err) == -1 ) { // error handling. } SEE ALSO
roar_vs_file(3), roar_vs_file_simple(3), roarvs(7), libroar(7), RoarAudio(7). RoarAudio June 2011 roar_vs_stream(3)
All times are GMT -4. The time now is 03:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy