Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

toupper(3c) [opensolaris man page]

toupper(3C)						   Standard C Library Functions 					       toupper(3C)

NAME
toupper - transliterate lower-case characters to upper-case SYNOPSIS
#include <ctype.h> int toupper(int c); DESCRIPTION
The toupper() function has as a domain a type int, the value of which is representable as an unsigned char or the value of EOF. If the argument has any other value, the argument is returned unchanged. If the argument of toupper() represents a lower-case letter, and there exists a corresponding upper-case letter (as defined by character type information in the program locale category LC_CTYPE), the result is the corresponding upper-case letter. All other arguments in the domain are returned unchanged. RETURN VALUES
On successful completion, toupper() returns the upper-case letter corresponding to the argument passed. ERRORS
No errors are defined. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ |ATTRIBUTE TYPE |ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |CSI |Enabled | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
_toupper(3C), setlocale(3C), attributes(5), standards(5) SunOS 5.11 14 Aug 2002 toupper(3C)

Check Out this Related Man Page

TOUPPER(3)						   BSD Library Functions Manual 						TOUPPER(3)

NAME
toupper, toupper_l -- lower case to upper case letter conversion LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <ctype.h> int toupper(int c); #include <ctype.h> #include <xlocale.h> int toupper_l(int c, locale_t loc); DESCRIPTION
The toupper() function converts a lower-case letter to the corresponding upper-case letter. The argument must be representable as an unsigned char or the value of EOF. Although the toupper() function uses the current locale, the toupper_l() function may be passed a locale directly. See xlocale(3) for more information. RETURN VALUES
If the argument is a lower-case letter, the toupper() function returns the corresponding upper-case letter if there is one; otherwise, the argument is returned unchanged. COMPATIBILITY
The 4.4BSD extension of accepting arguments outside of the range of the unsigned char type in locales with large character sets is considered obsolete and may not be supported in future releases. The towupper() function should be used instead. SEE ALSO
ctype(3), isupper(3), towupper(3), xlocale(3) STANDARDS
The toupper() function conforms to ISO/IEC 9899:1990 (``ISO C90''). BSD
July 17, 2005 BSD
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

File listing

I can't seem to list all the files that begin with a lower case or upper case letter between a-m while being in that directory? Please help I've tried everything from all the ls commands to even grep commands. b (5 Replies)
Discussion started by: Astudent
5 Replies

2. UNIX for Dummies Questions & Answers

replacing all 4 first upper char of every rec to lowercase ?

I have a file where some records have been updated the wrong way and need to fix it quickly since the amount can be alot. Every record where any of the first 4 characters are in upper case need to be changed to lowercase. Records can have '#' in position-1 for comments. These musn't be... (2 Replies)
Discussion started by: Browser_ice
2 Replies

3. UNIX for Dummies Questions & Answers

copy "cp" command how distinquish upper/lower case

hello, i thought this should work to specify that i want to "cp" all files no matter what the case, ie upper or lower, as i have 2 files called Makefile and mak cp -i mak* but apparently the -i isn't a valid option like it is with grep thanks for any suggestions! bobk (1 Reply)
Discussion started by: bobk544
1 Replies

4. Shell Programming and Scripting

Compare 2 files and send output to other

Hi, In File1.txt I have text like: 23AA3424DD23|3423ff25sd5345| and so on In File2.txt I have similar text as File1, but with ",": 23aa3424dd23,192.168.1.100, and so on I wan to remove the pipes from File1 and select 5 fields, then remove "," from File2.txt and select 2 fields (IP's... (14 Replies)
Discussion started by: cameleon
14 Replies

5. UNIX for Dummies Questions & Answers

need help with rename

hi guys i am writing a script to change the filename which is enterered as input to lower case letter even if one letter is upper case i have to change it to lower case i get the input and use sed comand should i use like that sed/s/a-z/A-Z/d will it be like that can u please help me (8 Replies)
Discussion started by: farhan_t49
8 Replies

6. Shell Programming and Scripting

Convert to upper case first letter of each word in column 2

Hi guys, I have a file separated by ",". I´m trying to change to upper case the first letter of each word in column 2 to establish a standard format on this column. I hope somebody could help me to complete the SED or AWK script below. The file looks like this: (Some lines in column 2... (16 Replies)
Discussion started by: cgkmal
16 Replies

7. Shell Programming and Scripting

issue with toupper in nawk

Hi All, I am seeing an issue while using toupper in nawk. Below is the code that I am using.Toupper method is not working as expected in this case.nawk 'NR==FNR{a=$4" "$5}NR>FNR{print NF?$0:a"\n";if(/^cn:/) x=toupper($0)}' FS="" id_list.txt attributes.txt > out In the above script, id_list... (9 Replies)
Discussion started by: Samingla
9 Replies

8. Shell Programming and Scripting

toupper or tolower case of first letter of the line depending on another file

Hi I would like to read if the first letter of a line in a first file (gauche.txt) is uppercase or lowercase, and change consequently the first letter of the corresponding line in the second file (droiteInit.txt). I have done this but it won't work (I launch this using gawk -f... (16 Replies)
Discussion started by: louisJ
16 Replies

9. UNIX for Dummies Questions & Answers

How to use wild cards to find files beginning with upper and lower case

Im trying to use wild cards to find files that start with either an upper or lower case letter e.g. list files that beginning with b or B, i also want to sort them by the time they were last modified. e.g latest file created first. At the moment i have the following code that ls -d... (3 Replies)
Discussion started by: parker4001
3 Replies

10. UNIX for Dummies Questions & Answers

AWK - changing first char from small to upper

I need to write script in AWK, changing first char from a line from lower to upper. I found function toupper etc. but have no idea how to sent only first char from every line instead of the whole line. Anyone has any idea? // Sorry for my english:D (8 Replies)
Discussion started by: bbqtoss
8 Replies

11. Shell Programming and Scripting

delete all characters that aren't a letter or number

hey :) if i have a variable that is example=lewisdenny(copywrite symbol) so its not a nomal letter but a symbol, how can i remove everything in the varible that isnt letter or number thanks :) and as a side little question do you know how to remove .zip from a file like if i ls... (7 Replies)
Discussion started by: lewisdenny
7 Replies

12. Shell Programming and Scripting

Change first letter of a word from lower case to upper case

Hi all, I am trying to find a way to change first letter in a word from lower case to upper case. It should be done for each first word in text or in paragraph, and also for each word after punctuation like . ; : ! ?I found the following command sed -i 's/\s*./\U&\E/g' $@ filenamebut... (7 Replies)
Discussion started by: georgi58
7 Replies

13. Shell Programming and Scripting

BASH - case statement

Hi Gurus, I have the below BASH code which does not works for upper case alphabets except Z (upper case Z). What may be the reason. Also escape sequences like \n, \t, \b, \033(1m \033(0m (For bold letter) are not working. case $var in ) echo "Lower case alphabet" ;; ... (7 Replies)
Discussion started by: GaneshAnanth
7 Replies

14. Shell Programming and Scripting

Grep command

grep -i -f panel_genes.txt hg19_refGene.txt > match.txt seems to be pulling names the do not exist in the input file (panel_genes.txt) - the output is attached as well (match.txt) For example, RNF185 or ZNF146 are not genes in the input. I am trying to match the input file genes only and am... (9 Replies)
Discussion started by: cmccabe
9 Replies

15. UNIX for Beginners Questions & Answers

Using awk to search case insensitive

Hello , Using the below scrip to search a string in a file , by case-insensitively Please assist on using the toupper() as getting error !. #!/usr/bin/ksh set -x curr_dir=`pwd` file_ctr=0 printf "\n Reviewing the output file from the directory: %s \n\n" $curr_dir ls -latr ... (4 Replies)
Discussion started by: Siva SQL
4 Replies