Sponsored Content
Top Forums Shell Programming and Scripting Problem with upper and lowercase in awk Post 302844042 by Jotne on Friday 16th of August 2013 07:51:09 AM
Old 08-16-2013
Thanks
[[:upper:]] [[:lower:]] seems to work correct.
But so should A-Z and a-z do also
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

after i convert upper case to lowercase

If user chosen to tolower then it should convert file name to lower or vice versa. when file names converted it should put into appropriate subdirectories. e.g when files converted it then seperate them out with file etension where it will seperate them out . such as file.pdf, phone.doc both... (1 Reply)
Discussion started by: Alex20
1 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. Shell Programming and Scripting

Uppercase/lowercase comparison of one character per line with awk??

Another frustrating scripting problem from a biologist trying to manipulate a file with several millions line. For each of the line I need to compare the uppercase A or C or G or T with the lowercase a or c or g or t. If there are more uppercases, a + should be added to a new column, otherwise a -... (10 Replies)
Discussion started by: ivpz
10 Replies

4. Shell Programming and Scripting

Convert lowercase to upper case based on certain conditions

Hello Unix Gurus : It would be really great if a solution can be found Following is the condition on Solaris Change all the records to upper case ignore the case for records having "A2B2 " in them . how can i use nawk or any other command Following is the SAMPLE INPUT... (6 Replies)
Discussion started by: tsbiju
6 Replies

5. Shell Programming and Scripting

SED (or other) upper to lowercase, with first letter of first word in each sentence uppercase

The title pretty much defines the problem. I have text files that are all in caps. I would like to convert them to lowercase, but have the first letter of the first word in each sentence in uppercase. I already have SED on the server for fixing / tweaking text files, but I'm open to other... (5 Replies)
Discussion started by: dockline
5 Replies

6. 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

7. UNIX for Dummies Questions & Answers

Convert lowercase to upper case in Sparc

Hi, I need to convert the hostname to uppercase and attach it to a string. eg: $hostname output mymac Final output should be Production.MYMAC (3 Replies)
Discussion started by: mohtashims
3 Replies

8. Shell Programming and Scripting

How to lowercase the values in a column in awk and include a dynamic counter?

Hi, I am trying to incorporate 2 functions into my `awk` command. I want to lower case Column 2 (which is essentially the same information in Col1, except in Col1 I want to maintain the capitalization) and I want to count from 0-N that begins and ends with the start of certain markers that I... (6 Replies)
Discussion started by: owwow14
6 Replies

9. Shell Programming and Scripting

Lower to upper..tr + awk ?

I have a file that has a pattern 2 lines, blanktwo line If encountering the first line, the 2nd line need to be converted to UPPERCASE...or...conver the 2nd line after ablank into uppercase Is there a 'tr' function in awk..(probably the best tool over sed) ? i.e. ......................... (6 Replies)
Discussion started by: stevie_velvet
6 Replies

10. Shell Programming and Scripting

Awk: get upper and lower bound per group

Hi all, I've data as: 22 51018157 51018157 exonic CHKB nonsynonymous SNV 22 51018204 51018204 exonic CHKB nonsynonymous SNV 22 51018428 51018428 exonic CHKB nonsynonymous SNV 22 51018814 51018814 ... (4 Replies)
Discussion started by: genome
4 Replies
XtCaseProc()															      XtCaseProc()

Name
  XtCaseProc - interface definition for procedure to convert the case of keysyms.

Synopsis
  typedef void (*XtCaseProc) (Display*, KeySym, KeySym *, KeySym *);
	 Display *display
	 KeySym  keysym;
	 KeySym  *lower_return;
	 KeySym  *upper_return;

Inputs
  display     Provides the display connection for which the conversion is required.

  keysym      Specifies the keysym to convert.

Outputs
  lower_return
	      Returns the lowercase equivalent for keysym.

  upper_return
	      Returns the uppercase equivalent for keysym.

Description
  An  XtCaseProc  is a case converter procedure registered with XtRegisterCaseConverter(), and invoked by XtConvertCase() and by the Transla-
  tion Manager in order to obtain the uppercase and lowercase versions of a keysym.  It should store the upper and  lower  case  versions  of
  keysym  at the addresses specified by lower_return and upper_return.	If there is no case distinction, it should store keysym at both loca-
  tions.

Usage
  You should only need to write a case converter procedure if you are working with non-standard keysyms.

Example
  The default case converter from the R4 Intrinsics is as follows:

     /* ARGSUSED */
     void _XtConvertCase(dpy, sym, lower, upper)
	 Display *dpy;
	 KeySym sym;
	 KeySym *lower;
	 KeySym *upper;
     {
	 *lower = sym;
	 *upper = sym;
	 switch(sym >> 8) {
	     case 0:
		 if ((sym >= XK_A) && (sym <= XK_Z))
		     *lower += (XK_a - XK_A);
		 else if ((sym >= XK_a) && (sym <= XK_z))
		     *upper -= (XK_a - XK_A);
		 else if ((sym >= XK_Agrave) && (sym <= XK_Odiaeresis))
		     *lower += (XK_agrave - XK_Agrave);
		 else if ((sym >= XK_agrave) && (sym <= XK_odiaeresis))
		     *upper -= (XK_agrave - XK_Agrave);
		 else if ((sym >= XK_Ooblique) && (sym <= XK_Thorn))
		     *lower += (XK_oslash - XK_Ooblique);
		 else if ((sym >= XK_oslash) && (sym <= XK_thorn))
		     *upper -= (XK_oslash - XK_Ooblique);
		 break;
	     default:
		 /* XXX do all other sets */
		 break;
	 }
     }

See Also
  XtConvertCase(1), XtGetKeysymTable(1), XtKeysymToKeycodeList(1), XtRegisterCaseConverter(1), XtSetKeyTranslator(1), XtTranslateKeycode(1).

Xt - Keyboard Handling														      XtCaseProc()
All times are GMT -4. The time now is 04:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy