08-24-2009
i get stuck with this shell script code
i get stuck here . Anyone could check my work?
the user type a group of upper case letters at a time with 0 at the end. Find and display the first letter in alphabetic order.
For example, input of F, G, K, S, U, G, D, Q, P , the result should be D
Any invalid input character (eg. #, $, 3, a, etc.) should cause an error message and be ignored.
echo "please enter an alphabet"
input3=1
echo "" > temp
while [ "$input3" != "0" ]; do
read input3
echo $input3 > check
if [ "$input3" != "0" ]; then
if [ check1=`grep -w "[A-Z]" check ]; then
echo $input3 >> temp
else
echo input should be upper case alphabet
fi
fi
done
grep -w "[A-Z]" temp > temp1
echo the first letter in alphabetic order is `sort temp1 | head -1`;;
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
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
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
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
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
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
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
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
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
#!/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
LEARN ABOUT DEBIAN
mfontset_lookup
mfontset_lookup(3m17n) The m17n Library mfontset_lookup(3m17n)
NAME
mfontset_lookup - Lookup a fontset.
SYNOPSIS
MPlist * mfontset_lookup (MFontset * fontset, MSymbol script, MSymbol language, MSymbol charset)
DESCRIPTION
Lookup a fontset. The mfontset_lookup() function lookups fontset and returns a plist that describes the contents of fontset corresponding
to the specified script, language, and charset.
If script is Mt, keys of the returned plist are script name symbols for which some fonts are specified and values are NULL.
If script is a script name symbol, the returned plist is decided by language.
o If language is Mt, keys of the plist are language name symbols for which some fonts are specified and values are NULL. A key may be Mt
which means some fallback fonts are specified for the script.
o If language is a language name symbol, the plist is a FONT-GROUP for the specified script and language. FONT-GROUP is a plist whose keys
are FLT (FontLayoutTable) name symbols (Mt if no FLT is associated with the font) and values are pointers to MFont.
o If language is Mnil, the plist is fallback FONT-GROUP for the script.
If script is Mnil, the returned plist is decided as below.
o If charset is Mt, keys of the returned plist are charset name symbols for which some fonts are specified and values are NULL.
o If charset is a charset name symbol, the plist is a FONT-GROUP for the charset.
o If charset is Mnil, the plist is a fallback FONT-GROUP.
RETURN VALUE
It returns a plist describing the contents of a fontset. The plist should be freed by m17n_object_unref().
COPYRIGHT
Copyright (C) 2001 Information-technology Promotion Agency (IPA)
Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License
<http://www.gnu.org/licenses/fdl.html>.
Version 1.6.2 12 Jan 2011 mfontset_lookup(3m17n)