Sponsored Content
Homework and Emergencies Homework & Coursework Questions i get stuck with this shell script code Post 302347163 by zaxxon on Tuesday 25th of August 2009 03:36:10 AM
Old 08-25-2009
Works on my box:

Code:
Enter one upper case character per line and hit enter; to stop enter a zero.
3
no upper case letter and/or more than 1 character!
d
no upper case letter and/or more than 1 character!
F
s
no upper case letter and/or more than 1 character!
S
h
no upper case letter and/or more than 1 character!
$
no upper case letter and/or more than 1 character!
p
no upper case letter and/or more than 1 character!
P
0
------ OUTPUT ------
F

I guess you did not use ksh - I have the same problem like you on bash. Not sure why though. When using ksh like in the shebang (#!/usr/bin/ksh) all is fine. Maybe someone else knows why, sorry.



Update:
Found a way in bash - change the line inside the case/esac to:
Code:
                [A-Z])          echo $INPUT >> $TMP
# to
                [[:upper:]])          echo $INPUT >> $TMP


Last edited by zaxxon; 08-25-2009 at 04:42 AM.. Reason: update
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

stuck on ksh script

hi, i need help to write script in korn shell that will display info. on system paging, system process table.system file table inf. thank you (1 Reply)
Discussion started by: neer45
1 Replies

2. Shell Programming and Scripting

simple script but am stuck

hey i am a bit stuck here. i just started work experience and i need to create a simple script which delete all files in a specify folder which are older then 2 days. :mad: i tried but it never works!!! anyone! i dont know much but unix since i mostly work on NT here but i dont wanna disapoint my... (2 Replies)
Discussion started by: GermanJulian
2 Replies

3. UNIX for Dummies Questions & Answers

stuck with a script

Hi There I am pretty new to UNIX and have only been using it from a basic point of view,I now want to start using it and learning more , have got a whole lot of books and documentation from the web and am slowly learning.I have written a get script in windows :- lcd E:\MAIN\PRO\FILES\MAINDB... (1 Reply)
Discussion started by: FOCKER
1 Replies

4. Shell Programming and Scripting

I am stuck in my script

Hi All I have script that find 777 dir with specific extension like .php .Now after finding all 777 directory i will place in httpd.conf using a directory directive ,Now i was not do that,if directory entry exitst in httpd.conf then script ignor it dont show me at stdout else if it dont find... (2 Replies)
Discussion started by: aliahsan81
2 Replies

5. Shell Programming and Scripting

Script Stuck In Loop

Hi all! Im trying to get this script to check for folders in a year/month/day folder structure and if the day doesnt exist then it makes the day. It will also make sure all of the days before todays date exist as well. This script assumes that the month and year folder already exist. It works... (3 Replies)
Discussion started by: Grizzly
3 Replies

6. Shell Programming and Scripting

korn shell display lenght problem!!! i got stuck on this

Using the KSH, write a shell script called display_by_length, which takes an absolute pathname to a directory and displays all ordinary files in the directory ordered by their length; for each file listed, display the name of the file and its length - nothing else. Extend this script to take an... (1 Reply)
Discussion started by: babuda0059
1 Replies

7. Shell Programming and Scripting

Stuck in this shell script - please help

hi: I'm trying to write a shell script that recognizes all .txt files in all the subdirectories in my current directory. Let's say that i have a directory called Applications which consists of many subdirectories on mnay levels. i want the shell script to look for all .txt files that exist... (14 Replies)
Discussion started by: miss_dodi
14 Replies

8. Shell Programming and Scripting

stuck on first script with sed issue

Hi, I'm developing my first bash script and have made good progress but stuck at this point. I've run sed on a text file to extract some data and have saved it into a variable e.g. $blah the variable contains emails as follows e.g. <a@b.com> <b@c.com> I'm now trying to edit... (2 Replies)
Discussion started by: newb1000
2 Replies

9. Shell Programming and Scripting

Error in script, STUCK :(

Hi All, I am beginner in scripting. I wrote a simple script to perform some task. It seem to have some error in command line, Kindly somebody help. Thanks #!/bin/bash date cd /home/poojasaxena/Desktop/CMS/script/DataMCMatch function pause(){ read -p "$*" } FILE=$1... (22 Replies)
Discussion started by: nrjrasaxena
22 Replies

10. Shell Programming and Scripting

Checking LB status.. stuck in script syntax of code

#!/bin/ksh #This script will check status of load balancer in AIX servers from hopbox #Steps to do as folows : #Login to server #netstat -ani | grep <IP> #check if the output contains either lo0 OR en0 #if the above condition matches, validation looks good #else, send an email with impacted... (7 Replies)
Discussion started by: vinil
7 Replies
TOWLOWER(3)						   BSD Library Functions Manual 					       TOWLOWER(3)

NAME
towlower, towlower_l -- upper case to lower case letter conversion (wide character version) LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <wctype.h> wint_t towlower(wint_t wc); #include <wctype.h> #include <xlocale.h> wint_t towlower_l(wint_t wc, locale_t loc); DESCRIPTION
The towlower() function converts an upper-case letter to the corresponding lower-case letter. Although the towlower() function uses the current locale, the towlower_l() function may be passed a locale directly. See xlocale(3) for more information. RETURN VALUES
If the argument is an upper-case letter, the towlower() function returns the corresponding lower-case letter if there is one; otherwise, the argument is returned unchanged. SEE ALSO
iswlower(3), tolower(3), towupper(3), wctrans(3), xlocale(3) STANDARDS
The towlower() function conforms to ISO/IEC 9899:1999 (``ISO C99''). BSD
October 3, 2002 BSD
All times are GMT -4. The time now is 08:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy