Sponsored Content
Top Forums Shell Programming and Scripting Replace spaces at a specific Location Post 302597324 by Scrutinizer on Friday 10th of February 2012 02:27:09 AM
Old 02-10-2012
Just column 12 or both column 11 and 12?
Code:
awk -F, '{gsub(/[ \t]/,x,$11);gsub(/[ \t]/,x,$12)}1' OFS=, infile

This User Gave Thanks to Scrutinizer For This Post:
 

10 More Discussions You Might Find Interesting

1. HP-UX

replacing text in specific location

i have a file that looks like this: 000000112/01/2008 D99999 000000 12/01/2008 D99999 000000 12/01/2008 1D99999 i need to replace the blanks into 1 for column 7,18-19 how can this be achieved using awk? Thanks. (1 Reply)
Discussion started by: zeontman
1 Replies

2. Infrastructure Monitoring

Need to kill processes from a specific location

Hi, I need to kill processes from a specific location for Linux, HP, AIX and Solaris. My problem is to be able to identify the location of the running processes. I've tried with a simple "ps -fu username | grep mylocation" but if the process command has been run directly from the location,... (2 Replies)
Discussion started by: Peuj
2 Replies

3. Shell Programming and Scripting

how to Add word at specific location in line

eg . i have file x.txt contains : java coding , shell scriptting etc... now i want to add "is langauge" after word java. output should be java is langauge coding , shell scriptting etc... any idea how to use shell script to do it ? (10 Replies)
Discussion started by: crackthehit007
10 Replies

4. Shell Programming and Scripting

How to append a string to a specific location in a line

Hi, I have a to modify a line and insert a keyword in the middle to a specific location. My line looks like this FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS (ABC, DEF, GHI) I want to change it as FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"' TRAILING... (4 Replies)
Discussion started by: mwrg
4 Replies

5. Shell Programming and Scripting

Updating the files at specific location

Hi All, I have a requirement wherein I need to test if a line in file succeeding "IF" statement has "{" .If the line succeeding "IF" statement does not have "{" , then I need to insert the "{". Similarly , I need to check if a line in file preceding "ENDIF" statement has "}" .If not , then I... (2 Replies)
Discussion started by: swapnil.nawale
2 Replies

6. Shell Programming and Scripting

Find and replace a string a specific value in specific location in AIX

Hi, I have following samp.txt file in unix. samp.txt 01Roy2D3M000000 02Rad2D3M222222 . . . . 10Mik0A2M343443 Desired Output 01Roy2A3M000000 02Rad2A3M222222 . . (5 Replies)
Discussion started by: techmoris
5 Replies

7. Shell Programming and Scripting

Help with replace character based on specific location

Hi, I got long list of reference file (column one is refer to the header in input file; column 2 is info of start position in input file; column 3 is info of end position in input file;) shown as below: read_2 10 15 read_3 5 8 read_1 4 10 . . . Input file (huge file with total... (6 Replies)
Discussion started by: perl_beginner
6 Replies

8. Shell Programming and Scripting

Content merging at a specific location in a file

Hi, This is a bit lengthy problem, i will try to keep explaining it simple. I have got a file say file1 that contains the following in it, ------------------------------------------------------------------------ r201463 | ngupta@gmail.com | 2012-06-19 22:02:20 +0530 (Tue, 19 Jun 2012) |... (3 Replies)
Discussion started by: Kashyap
3 Replies

9. Shell Programming and Scripting

Using sed to replace a word at specific location

I'm try to change a the prohibit to aix for the lines starting with ssh and emagent and rest should be the same. Can anyone please suggest me how to do that using a shell script or sed passwd account required /usr/lib/security/pam_prohibit passwd session required ... (13 Replies)
Discussion started by: pjeedu2247
13 Replies

10. Shell Programming and Scripting

Shell command to Strip white spaces at specific location

Hello, I have a Comma separated input file with one of the sample records as below: -9223372036854477528,"834","834003325515BXNI00101012013C","5","PLAN_VALUE","PPO, General Cable","C",20130101,99991231,"A","2012-12-25-13.58.14.434000","ZPL2 ","2012-12-25-13.58.14.434000","ZPL2 ... (4 Replies)
Discussion started by: Praveenkulkarni
4 Replies
XtPopupSpringLoaded()													     XtPopupSpringLoaded()

Name
  XtPopupSpringLoaded - map a spring-loaded popup from within an application.

Synopsis
  void XtPopupSpringLoaded(popup_shell)
	   Widget popup_shell;

Inputs
  popup_shell
	    Specifies the shell widget to be popped up.

Availability
  Release 4 and later.

Description
  XtPopupSpringLoaded() 	calls	      the	  functions	    registered	       on	  the	     specified	      shell's
  XtNpopupCallback callback list and pops the shell up, making it a spring-loaded shell.  A spring-loaded shell is one that is popped  up  in
  response to a button press and will pop down when the button is released.  Spring-loaded shells have events dispatched to them specially to
  ensure that they receive the button up event, even if it occurs in another window.  See XtAddGrab() for more details.

  XtPopupSpringLoaded() performs exactly like XtPopup(), except that XtPopupSpringLoaded() does the following:

  o  Sets the shell spring_loaded field to True.

  o  Always calls XtAddGrab() with exclusive set to True and spring_loaded set to True.

  See XtPopup() for details.

Usage
  You can also pop up spring loaded shells by using the XtMenuPopup action in a translation table.  This  predefined  action  calls  XtPopup-
  SpringLoaded().

  Any pop up shell can be popped down with XtPopdown(), the XtCallbackPopdown() callback function, or with the XtMenuPopdown action.

  XtPopupSpringLoaded()  was  added  in  Release  4,  and  prior to this release, the only way to pop up a spring loaded shell was to use the
  MenuPopup action (which has now been renamed XtMenuPopup).

See Also
  XtAddGrab(1), XtCreatePopupShell(1), XtMenuPopdown(1), XtMenuPopup(1), XtPopdown(1), XtPopup(1).

Xt - Pop Ups														     XtPopupSpringLoaded()
All times are GMT -4. The time now is 05:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy