11-19-2009
Thank you everyone, this was great information!
Just out of curiosity, I think the first sed command would have actually worked if the action were negated. (Since it seemed to do the exact opposite thing required). Does anyone have an idea of how that action would be properly negated? or would you negate the string regex instead and keep the action?
I would love to know just to further my own knowledge.
Last edited by ryanfx; 11-19-2009 at 08:51 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
suppose u hava a file
G1354R tGGC-CGC
D1361N cGAC-AAC
I1424T ATC-ACC
R768W gCGG-TGG
Q1382R CAG-CGG
Q178E gCAG-GAG
Y181C TAC-TGC
.........cont.
So the question is
By searching for first word i.e.character say R
output shud be
R768W gCGG-TGG
R182P CGG-CCG
R189W ... (6 Replies)
Discussion started by: cdfd123
6 Replies
2. Shell Programming and Scripting
Hi,
I need to check if a particular name is already in the file or not and i am using following code for this...
match=$(grep -n -e "$output1" outputfiles.txt )
where output1 is the variable name having names in it and outputfiles.txt is the file name ..and i am using ksh
can anybosy... (6 Replies)
Discussion started by: manmeet
6 Replies
3. Shell Programming and Scripting
Hi
I have a text file as follows
BOB
14/14
TOM
94/94
SAM
3/3
CRIS
13/13
TOM
6/6
CRIS
27/27
SAM
2/2
JACK
25/25
CRIS (6 Replies)
Discussion started by: shellignorant
6 Replies
4. Shell Programming and Scripting
Hi,
I have a file f1 having the contents as below
select (<condn>) from dual
I have another file f2 having the contents as below
1,
2,
3
I want to replace <condn> in f1 with the contents of f2
I tried using sed like this
sed "s:<condn>:`cat f2`:g" f1
The above command resulted in sed:... (3 Replies)
Discussion started by: mr_manii
3 Replies
5. Shell Programming and Scripting
Hello everyone,
I currently have a situation which is causing me some issues for keeping up with certain files. I will explain this to the best of my abilities.
I have a list of files as follows
50_REPORT_1111 - file contains the word Car
50_REPORT_2222 - file contains the word House... (15 Replies)
Discussion started by: DerangedNick
15 Replies
6. Shell Programming and Scripting
I have a file which will have rows like shown below,
ST*820*316054716
RMR*IV*11333331009*PO*40.31
REF*IV*22234441009*xsss471-2762
DTM*003*091016
ENT*000006
RMR*IV*2222234444*PO*239.91
REF*IV*1234445451009*LJhjlkhkj471-2762 </SPAN>
DTM*003*
091016
RMR*IV*2223344441009*PO*40.31... (18 Replies)
Discussion started by: Muthuraj K
18 Replies
7. Shell Programming and Scripting
Hi,
Below is my input file:
>tempZ_1
SAFSDAFDSG
GGERRTTZZZ
ZASRARARET
WETPOASDAZ
ZZZASASFAS
>temp_9
ASAEGPIOEO
EIOPIZZZAS
FDFGZZZARA
ESEAZZZAAS
.
.
Desired output file: (9 Replies)
Discussion started by: patrick87
9 Replies
8. Shell Programming and Scripting
Hello,
I have a unix file about 3000lines which i want to copy from and paste it into a Word document. If i cat the file and try to scroll through it then not everything is captured so i am getting and incomplete paste.
Any help is really appreciated.
jak (2 Replies)
Discussion started by: jakSun8
2 Replies
9. UNIX Desktop Questions & Answers
Hi,
I have a single column of numbers from in tabulated text format ranging from 0 to 1. I want to manipulate the list of numbers so that if the number is greater than 0.5 (> 0.5), I get 1 - number. If the number is less than 0.5, the number is taken as it is and not altered. For example:
... (1 Reply)
Discussion started by: evelibertine
1 Replies
10. Shell Programming and Scripting
Hi
I have 2 files
1.del
----
1,2,3,4,5
1,2,3,4,4
1,1,1,1,2
2.del
----
1,2,3,4,5
1,
1,2,3,4,4
1,1,1,1,2
I need to compare the above two files in unix, as in the output should only tell the difference in contents as I should get only the line
1 ( from 2.del) , rest all lines are... (4 Replies)
Discussion started by: Ethen561
4 Replies
LEARN ABOUT HPUX
xtcallactionproc
XtCallActionProc() XtCallActionProc()
Name
XtCallActionProc - explicitly invoke a named action procedure.
Synopsis
void XtCallActionProc(widget, action, event, params, num_params)
Widget widget;
String action;
XEvent *event;
String *params;
Cardinal num_params;
Inputs
widget Specifies the widget in which the action is to be invoked; must be of class Core or any subclass thereof.
action Specifies the name of the action routine.
event Specifies the event to pass to the action procedure.
params Specifies parameters to pass to the action procedure.
num_params
Specifies the number of elements in the params array.
Description
XtCallActionProc() looks up the action procedure named action and invokes it, passing widget, event, params, and num_params as arguments.
Before calling the named action, XtCallActionProc() invokes any action hook procedures that have been registered with XtAppAddActionHook().
It is the responsibility of the caller to ensure that the contents of the event, params, and num_params arguments are appropriate for the
specified action routine and, if necessary, that the specified widget is realized and/or sensitive. If the named action routine cannot be
found, XtCallActionProc() generates a warning message and returns.
When searching for the action procedure, XtCallActionProc() looks in the following places:
o The widget's class and all superclass action tables, in subclass-to-superclass order.
o The parent's class and all superclass action tables, in subclass-to-superclass order, then on up the ancestor tree.
o The action tables registered with XtAppAddActions() and XtAddActions() from the most recently added table to the oldest table.
See Also
XtAppAddActionHook(1), XtRemoveActionHook(1),
XtActionHookProc(2).
Xt - Translations and Actions XtCallActionProc()