Sponsored Content
Top Forums Shell Programming and Scripting Append has prefix in while loop Post 303040867 by Scrutinizer on Friday 8th of November 2019 04:02:28 AM
Old 11-08-2019
Use the tolower(str) function to changes strings to lowercase where appropriate to make it case insensitive...

Last edited by Scrutinizer; 11-08-2019 at 05:36 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

remove filename prefix

I've got a bunch of files called oldabc, olddef etc. i want to copy these to be abc, def.... I can do this with file extensions....but can get the logic to work for prefixes. All the files I am interested in have a prefix of 'old'. This loop is no good for me....it looks at the content... (2 Replies)
Discussion started by: peter.herlihy
2 Replies

2. Shell Programming and Scripting

Need to replace a . with / which is having a matching Prefix

Hi Input File: export NAME='AA.BB.CC' export FILE=1.2.3 AA.BB.CC export MAIL= '1.3.3' export char='XX.YY.ZZ' Out File export NAME='AA/BB/CC' export FILE=1.2.3 AA.BB.CC export MAIL= '1.3.3' export char='XX/YY/ZZ' Only the Lines which have export and have alphabets after =... (9 Replies)
Discussion started by: pbsrinivas
9 Replies

3. Shell Programming and Scripting

prefix suffix to each argument

Hi, I have a variable, which contains comma separated values. Something like. StringA="abc,def,ghi,jkl" I want to apply prefix and suffix to each value in the string without using any loops. Say if Prefix is Pre_ and Suffix is _Suf then I need to get ... (1 Reply)
Discussion started by: tostay2003
1 Replies

4. UNIX for Dummies Questions & Answers

how to cut prefix from a string

I have a file: chromosome1:436728 chromosome2:32892 ..... chromosome22:23781 I just want to get the number, not the prefix "chromosomeX", so I want to remove all the prefix ahead of the numbers. How can I do that?? Thanks!!! (PS: give me some very simple command so that I can understand... (4 Replies)
Discussion started by: kaixinsjtu
4 Replies

5. UNIX for Dummies Questions & Answers

--prefix question

OK, now I just feel plain silly asking this. But I am very much a beginner at compiling and installing Unix software, so... When setting the prefix, do you also have to specify the directory the files reside in? For example, lets say I am installing cURL in /usr/local Would I set the prefix... (1 Reply)
Discussion started by: RobertSubnet
1 Replies

6. UNIX for Dummies Questions & Answers

What prefix backslash does to command

In unix when I run rm command, it asks for file removal confirmation e.g. rm netmail_log.csv rm: remove netmail_log.csv (yes/no)? n But if i prefix backslash to rm it does not ask for confirmation. Does anyone know what backslash does to command or shell ? e.g. \rm netmail_log.csv (1 Reply)
Discussion started by: Devdatta
1 Replies

7. Shell Programming and Scripting

append to same string variable in loop

I want to append values to same string variable inside a recursive function that I have .. I do not want to write to any file but use a variable.. Can anyone please help with it? Thanks in advance. (6 Replies)
Discussion started by: Prev
6 Replies

8. Shell Programming and Scripting

Find all images, append unique prefix to name and move to different directory

Hi, I have a directory with Multiple subdirectories and 1000s of pictures (jpg) in each directory. The problem is that each directory has a 001.jpg in them. I want to append a unique name (the directory_name)would be fine. and then move them to one main backup directory once they have been... (1 Reply)
Discussion started by: kmaq7621
1 Replies

9. Shell Programming and Scripting

Removing only Prefix string (!)

Hello everyone, I want to remove only prefix ME_ from all the values that are present in the FILEA. Below code I'm using for this. sed 's/ME\_//g' FILEA > FILEB Using the above code, all ME_ values are getting removed from the file. But the problem here is I want to remove only Prefix ME_... (4 Replies)
Discussion started by: ed_9
4 Replies

10. Shell Programming and Scripting

Extract Uniq prefix from a start and end prefix

Dear All, assume i have a file with content: <Start>6000</Start> <Stop>7599</Stop> the output is: 6000 7000 7100 7200 7300 7400 7599 how should we use any awk, sed, perl can do this task, means to extract the uniq prefixes from the start and stop prefix. Thanks Jimmy (3 Replies)
Discussion started by: jimmy_y
3 Replies
conv(3) 						     Library Functions Manual							   conv(3)

NAME
toascii, tolower, _tolower, toupper, _toupper - Translate characters LIBRARY
Standard C Library (libc.so, libc.a) SYNOPSIS
#include <ctype.h> int toascii( int c); int tolower( int c); int _tolower( int c); int toupper( int c); int _toupper( int c); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: toascii(), tolower(), _tolower(), toupper(), _toupper(): XPG4, XPG4-UNIX Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Specifies the character to be converted. DESCRIPTION
The toascii(), tolower(), _tolower(), toupper(), and _toupper() functions translate all characters, including multibyte characters, to their specified character values. The toascii() function converts its input to a 7-bit ASCII character. The tolower() function takes an int value that can be represented as an unsigned char or the value of EOF (defined in the stdio.h header file) as its input. When the input of the tolower() function expresses an uppercase letter, and there exists a corresponding lowercase letter (as defined by character type information in the program locale category LC_CTYPE), the corresponding lowercase letter is returned. All other input val- ues in the domain are returned unchanged. The tolower() function has as its domain the range -1 through 255. In the C locale, or in a locale where case-conversion information is not defined, the tolower() function determines the case of characters according to the rules of the Portable Character Set (ASCII characters). Characters outside the ASCII range of characters are returned unchanged. The _tolower() macro is equivalent to the tolower() function, but executes faster. If the value of the c parameter to the _tolower() macro does not have a corresponding lowercase character, the results of the function are undefined. The toupper() function takes an int value that can be represented as an unsigned char or the value of EOF (defined in the stdio.h header file) as its input. When the input of the toupper() function expresses a lowercase letter, and there exists a corresponding uppercase letter (as defined by character type information in the program locale category LC_CTYPE), the corresponding uppercase letter is returned. All other input val- ues in the domain are returned unchanged. The toupper() function has as its domain the range -1 through 255. In the C locale, or in a locale where case-conversion information is not defined, the toupper() function determines the case of characters according to the rules of the Portable Character Set (ASCII characters). Characters outside the ASCII range of characters are returned unchanged. The _toupper() macro is equivalent to the toupper() function, but executes faster. If the value of the c parameter to the _toupper() macro does not have a corresponding uppercase character, the results of the function are undefined. NOTES
The LC_CTYPE category of the current locale affects all conversions. See the i18n_intro(5) reference page for more information on locale variables. RETURN VALUES
The toascii() function returns the logical AND of parameter c and the value 0X7F. When the c parameter is a character for which the isupper() function is TRUE, there is a corresponding character for which the islower() function is also TRUE. That lowercase character is returned by the tolower() function or by the _tolower() macro. Otherwise, the c parame- ter is returned unchanged. When the c parameter is a character for which the islower() function is TRUE, there is a corresponding character for which the isupper() function is also TRUE. That uppercase character is returned by the toupper() function or by the _toupper() macro. Otherwise, the c parame- ter is returned unchanged. RELATED INFORMATION
Functions: ctype(3) Other: i18n_intro(5), standards(5) delim off conv(3)
All times are GMT -4. The time now is 12:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy