Sponsored Content
Full Discussion: change character case
Top Forums UNIX for Dummies Questions & Answers change character case Post 302069236 by jim mcnamara on Thursday 23rd of March 2006 02:00:54 PM
Old 03-23-2006
or.
Code:
 echo "value" | tr -s '[:lower:]' '[:upper:]'

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

change filenames to Proper case

Hi, I have files with all its characters in lower cases. I need to change them to "proper case" (starting char to be come Upper case). How can I? Pls suggest. for e.g. xyz.txt should become Xyz.txt TIA Prvn (7 Replies)
Discussion started by: prvnrk
7 Replies

2. Shell Programming and Scripting

How do I ignore one character in a case statement? PLEASE HELP!

Hello, I am new to this forums. I need help with shell, and ksh in particular. I have a case statement that does something if -k. So it looks like: case $arg in -k) PUT=y, SEND=1 Thats all good and dandy. But now I want to change it where whether or not the user puts -k or not, it will do... (2 Replies)
Discussion started by: cpunisher
2 Replies

3. Shell Programming and Scripting

Convert first character of each word to upper case

Hi, Is there any function(Bash) out there that can convert the first character of each word to upper case?... (3 Replies)
Discussion started by: harchew
3 Replies

4. UNIX for Dummies Questions & Answers

Change case of single character in pattern

Using UNIX tools, but not using GAWK (NAWK is OK), is there a more elegant way to achieve this: sed ' s/_a/_A/1 s/_b/_B/1 s/_c/_C/1 rest of alpahabet ' I want to change the case of a single character in each string of a text file. The character will be matched by regex '_' and only... (2 Replies)
Discussion started by: uiop44
2 Replies

5. Shell Programming and Scripting

data array needs to change upper case to lower case

Hi all, i have a data array as followes. ARRAY=DFSG345GGG ARRAY=234FDFG090 ARRAY=VDFVGBGHH so on.......... i need all english letters to be change to lower case. So i am expecting to see ARRAY=dfsg345ggg ARRAY=234fdfg090 ARRAY=vdfvgbghh so on........ If i have to copy this data in... (8 Replies)
Discussion started by: usustarr
8 Replies

6. Shell Programming and Scripting

[Solved] Change Upper case to Lower case in C shell

Is there a command that can switch a character variable from UPPER case to lower case? like foreach AC ( ABC BCD PLL QIO) set ac `COMMAND($AC)` ... end Thanks a lot! (3 Replies)
Discussion started by: rockytodd
3 Replies

7. Shell Programming and Scripting

Change case preserving the same case

how can i do a case insensitive search/replace but keep the same case? e.g., i want to change a word like apple-pie to orange-cake but for the first word if the first letter of the keyword or the letter after the - is capitalised i want to preserve that e.g., if the before is: ... (5 Replies)
Discussion started by: vanessafan99
5 Replies

8. Shell Programming and Scripting

Need help to change tokenized string case

I'm trying to change the string cases for a particular column, but can't figure how do to it with sed. Example: Strings (space as delimiter): write group MYGROUP MySpecialGroup /local/users/mygroup write group HISGROUP HisSpecialGroup /local/users/hisgroup write group HerGroup... (3 Replies)
Discussion started by: fluffy_ko
3 Replies

9. UNIX for Dummies Questions & Answers

Change lowercase to upper case

dear all, i have file input ABCDE_Asta_Key_Park,COJ050,10.142.3.150 C_BDEFG_City_Lake,C_BIR0,10.135.3.6 C_FDGEBIR_Axaudia,C_ABIR1,10.135.3.34 I want to change lowercase in to uppercase for all strings output ABCDE_ASTA_KEY_PARK,COJ050,10.142.3.150 C_BDEFG_CITY_LAKE,C_BIR0,10.135.3.6... (5 Replies)
Discussion started by: radius
5 Replies

10. 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
ADDCSLASHES(3)								 1							    ADDCSLASHES(3)

addcslashes - Quote string with slashes in a C style

SYNOPSIS
string addcslashes (string $str, string $charlist) DESCRIPTION
Returns a string with backslashes before characters that are listed in $charlist parameter. PARAMETERS
o $str - The string to be escaped. o $charlist - A list of characters to be escaped. If $charlist contains characters , etc., they are converted in C-like style, while other non-alphanumeric characters with ASCII codes lower than 32 and higher than 126 converted to octal representation. When you define a sequence of characters in the charlist argument make sure that you know what characters come between the characters that you set as the start and end of the range. <?php echo addcslashes('foo[ ]', 'A..z'); // output: foo[ ] // All upper and lower-case letters will be escaped // ... but so will the []^_` ?> <?php echo addcslashes("zoo['.']", 'z..A'); // output: zoo['.'] ?> RETURN VALUES
Returns the escaped string. CHANGELOG
+--------+---------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------+ | 5.2.5 | | | | | | | The escape sequences v and f were added. | | | | +--------+---------------------------------------------+ EXAMPLES
$charlist like "..37", which would escape all characters with ASCII code between 0 and 31. Example #1 addcslashes(3) example <?php $escaped = addcslashes($not_escaped, "..37!@177..377"); ?> SEE ALSO
stripcslashes(3), stripslashes(3), addslashes(3), htmlspecialchars(3), quotemeta(3). PHP Documentation Group ADDCSLASHES(3)
All times are GMT -4. The time now is 12:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy