Sponsored Content
Top Forums Shell Programming and Scripting Another tricky sed or awk question Post 302429439 by awayand on Monday 14th of June 2010 12:12:13 PM
Old 06-14-2010
perfect, thanks!
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

Tricky File Permission Question

I'm trying to answer the following question about file permissions in Unix. Consider a file with the following permissions: rwx---r-- I am not the owner of this file, but I am a member of the group of this file. My question is: do I have read access to this file? I thought... (3 Replies)
Discussion started by: Hook
3 Replies

2. Shell Programming and Scripting

Tricky Sed

Hello. I am trying to convert occurrences of 'NULL' from a datafile. The 'NULL' occurences appears at this: |NULL| NULL|NULL| NULL|NULL| NULL|NULL| NULL| There should be 52 fields per line. I would like any occurrence of | NULL| or |NULL| to appear as '||' Currently I am using this sed... (2 Replies)
Discussion started by: bestbuyernc
2 Replies

3. Shell Programming and Scripting

Tricky script question

Hi, I'm in the midst of writing a UNIX script that sftp's files to an external host and am stuck with a problem. The problem is that the files created on my server as a order number that correlates to a sequence of directories on the remote host which is where the file should be ftp'ed. ... (3 Replies)
Discussion started by: budrito
3 Replies

4. UNIX for Dummies Questions & Answers

Tricky Quotation Question

Hi, I am at a point in my script where I defined the number of the command line parameter I would like to set a variable equal to: parameter_number=14 I would then like to set a variable equal to the correct parameter: variable=$parameter_number The issue here is that {} is required... (2 Replies)
Discussion started by: msb65
2 Replies

5. Shell Programming and Scripting

sed or awk question

Hello expert, I have an output file with few thousand lines similar like below : "Future Netmgmt" "10.99.16.0" "N" "10" "10.0.0.0" "Circuitless-IP" " " "255.255.254.0" "Future Netmgmt" "10.99.18.0" "N" "10" "10.0.0.0" "Circuitless-IP" " " "255.255.254.0" "WAAS loopbacks" "10.99.20.0"... (6 Replies)
Discussion started by: dannytrinh
6 Replies

6. Shell Programming and Scripting

Tricky sed or awk question

Hello everyone, unfortunately I am no unix nor scripting guru, which is why I am asking for help here. I am trying to reformat a .csv file using sed or awk which has the following format: a,b,C-D-E,f,g h,i,J,k,l m,n,O-P-Q-R-S,t,u v,w,X-Y,z,a It's basically a 5-field text file which has an... (7 Replies)
Discussion started by: awayand
7 Replies

7. Shell Programming and Scripting

sed tricky problem

Hi, I have a file which contains two strings: AAAAA and BBBBB I have two variables in my script: DATE="03/21/2010" aDate="20100321" I need to replace string AAAAA with variable $DATE and BBBBB with $aDate. Here is what I do sed "s/AAAAA/$DATE/" $BASIC_TMPLT | sed "s/BBBBB/$aDate/" >... (4 Replies)
Discussion started by: axed
4 Replies

8. UNIX for Dummies Questions & Answers

Tricky GREP question..

I have some large login files that I need to extract (user)@(server) from. Where it gets tricky is that there is usually more than one '@' sign on each line(although it does have a leading space if it's not part of the (user)@(server) string), I need only the (user)@(server) section, I need only... (6 Replies)
Discussion started by: Mordaris
6 Replies

9. Shell Programming and Scripting

Tricky BASH quoting question

I have some data files that I can identify by a certain pattern in the names using find. Every one of those data files has an XML file associated with it (can be multiple data files per XML file). The XML file is always up one directory from the data file(s) in a folder calledRun##### -... (12 Replies)
Discussion started by: Michael Stora
12 Replies

10. Shell Programming and Scripting

Tricky sed required

Hi All I need to put some sed together for a task and its a bit advanced for me, so I thought I'd ask if anyone here could help. I have a csv file with content like this - "","abcde","","" "'","abcde","","" "","","","1234" "'e'","","","" I need to remove any single quotes that fall... (17 Replies)
Discussion started by: steadyonabix
17 Replies
XmSetProtocolHooks(3X)													    XmSetProtocolHooks(3X)

NAME
XmSetProtocolHooks - A VendorShell function that allows pre and post actions to be executed when a protocol message is received from MWM SYNOPSIS
#include <Xm/Xm.h> #include <Xm/Protocols.h> void XmSetProtocolHooks (shell, property, protocol, prehook, pre_closure, posthook, post_closure) Widget shell; Atom property; Atom protocol; XtCallbackProc prehook; XtPointer pre_closure; XtCallbackProc posthook; XtPointer post_closure; void XmSetWMProtocolHooks (shell, protocol, prehook, pre_closure, posthook, post_closure) Widget shell; Atom protocol; XtCallbackProc prehook; XtPointer pre_closure; XtCallbackProc posthook; XtPointer post_closure; DESCRIPTION
XmSetProtocolHooks is used by shells that want to have pre and post actions executed when a protocol message is received from MWM. Since there is no guaranteed ordering in execution of event handlers or callback lists, this allows the shell to control the flow while leaving the protocol manager structures opaque. XmSetWMProtocolHooks is a convenience interface. It calls XmSetProtocolHooks with the property value set to the atom returned by interning WM_PROTOCOLS. Specifies the widget with which the protocol property is associated Specifies the protocol property Specifies the protocol atom (or an int cast to Atom) Specifies the procedure to call before calling entries on the client callback-list Specifies the client data to be passed to the prehook when it is invoked Specifies the procedure to call after calling entries on the client callback-list Specifies the client data to be passed to the posthook when it is invoked For a complete definition of VendorShell and its associated resources, see VendorShell(3X). SEE ALSO
VendorShell(3X), XmInternAtom(3X), XmSetWMProtocolHooks(3X) XmSetProtocolHooks(3X)
All times are GMT -4. The time now is 05:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy