I'm hoping someone can help me on this. I have a data file that greatly simplified might look like this:
sec;src;dst;proto
421;10.10.10.1;10.10.10.2;tcp
426;10.10.10.3;10.10.10.4;udp
442;10.10.10.5;10.10.10.6;tcp
sec;src;fac;dst;proto
521;10.10.10.1;ab;10.10.10.2;tcp... (3 Replies)
hi all
i get a file from a server and i do not know how many fields that file will contain.
i need to cut from the second column of the file to the last, irrespective of how many fields are there.
is there any way to make the awk command dynamic for fetching from the second to the last... (4 Replies)
I want to print the contents of a file from 2nd line to last but one line using the AWK command.
I tried using the Shell Script,MyScript as fallows:
MyScript:
{
if(NR>1)
{
if(NR<9)
{
print $0
}
}
}
and used the commnd :
awk -f MyScript Filename
Note: Filename contains 9 lines text.... (0 Replies)
I am afraid I don't understand awk well enough to do the following.
I have a file with a bunch of select statements where the a line starts off with this pattern:
"Last parsed SQL statement :", then continues with the select statement. At the first blank space I'd like it to stop, print that... (5 Replies)
I've got a number of RHEL systems and I'm trying to use awk to read and format the output of /etc/passwd. But I'd like to display the host name of the system at the beginning of each line of output.
I've got it working without the adding the host name in this script:
#!/bin/bash
... (3 Replies)
I need to develop a script where I will take two date arguments as parameter date1 and date2 which will in format YYYYMM.
Below is the input file say sample.txt.
sample.txt will have certain blocks starting with P1.
Each block will have a value 118,1:TIMESTAMP.
I need to compare the... (7 Replies)
Heyas
Me try to print only the value of a (specific) variable assignment from a file.
What i get (1):
:) tui $ bin/tui-conf-get ~/.tui_rc TUI_THEME
dot-blue
""
"$TUI_DIR_INSTALL_ROOT/usr"
"$TUI_DIR_INSTALL_ROOT/etc/tui"
"$TUI_PREFIX/share/doc/tui"
"$TUI_PREFIX/share/tui"... (2 Replies)
My file (the output of an experiment) starts off looking like this,
_____________________________________________________________
Subjects incorporated to date: 001
Data file started on machine PKSHS260-05CP
**********************************************************************
Subject 1,... (9 Replies)
In the f1 file below I am trying to clean it up removing lines the have _tn_ in them. Next, removing the characters in $2 before the ninth /. Then I remove the ID_(digit- always 4). Finally, the charcters after and including the first _. It is curently doing most of it but the cut is removing $1... (5 Replies)
Discussion started by: cmccabe
5 Replies
LEARN ABOUT OSF1
xmlistreplacepositions
XmListReplacePositions(3X)XmListReplacePositions(3X)NAME
XmListReplacePositions - A List function that replaces items in a list based on position
SYNOPSIS
#include <Xm/List.h>
void XmListReplacePositions (widget, position_list, item_list, item_count)
Widget widget;
int *position_list;
XmString *item_list;
int item_count;
DESCRIPTION
XmListReplacePositions replaces noncontiguous items in a list. The item at each position specified in position_list is replaced with the
corresponding entry in item_list. When the items are inserted into the list, they are compared with the current XmNselectedItems list. Any
of the new items that match items on the selected list appears selected. A warning message is displayed if a specified position is
invalid; that is, the value is 0, a negative integer, or a number greater than the number of items in the list. Specifies the ID of the
List widget. Specifies an array of the positions of items to be replaced. The position of the first item in the list is 1; the position
of the second item is 2; and so on. Specifies an array of the replacement items. Specifies the number of elements in position_list and
item_list. This number must be non-negative.
For a complete definition of List and its associated resources, see XmList(3X).
SEE ALSO XmList(3X)XmListReplacePositions(3X)