04-25-2008
this works for my:
awk -F":" '/Segment/ { print $2}' file.txt
5.49secs
10.01secs
7.82secs
5.31secs
pure shell:
grep Segment file.txt | cut -d: -f2
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I need to read two colums(4th and 5th) from a file and do some manipulation
Input file is
401500 IOC Q 14 14
406200 LC Q 1 1
410124 IOC Q 5 4
410124 LC Q 11 8
410132 IOC Q 230 229
410148 IOC Q ... (3 Replies)
Discussion started by: rejirajraghav
3 Replies
2. Shell Programming and Scripting
Hi , i am having some problem with re-reading the same file in AWK.
here is the scenario.
function 1 {
some_string > " file1 " # i have redirected output to file1.
...........
........
}
Now in
function 2 {
... (1 Reply)
Discussion started by: madhaviece
1 Replies
3. Shell Programming and Scripting
Hi Experts.
I need to list the file and the filename comes from the file ListOfFile.txt.
Basicly I have a filename "ListOfFile.txt" and it contain
Example of ListOfFile.txt
/home/Dave/Program/Tran1.P
/home/Dave/Program/Tran2.P
/home/Dave/Program/Tran3.P
/home/Dave/Program/Tran4.P... (7 Replies)
Discussion started by: tanit
7 Replies
4. Shell Programming and Scripting
Hi,
I have two files with the format shown below. I need to read first field(value before comma) from file 1 and search for a record in file 2 that has the same value in the field "KEY=" and write the complete record of file 2 with corresponding field 2 of the first file in to result file.
... (11 Replies)
Discussion started by: King Kalyan
11 Replies
5. Shell Programming and Scripting
OK,
I want to read a textfile `base.txt` looking like this:
MASTER SLAVE PERP_BASE /_\ DAYS /_\ DOPPLER
x20080613 x20080829 123.3909 77 11.04877
x20080613 x20080909 -5.9504 88 -12.78454
x20080613... (2 Replies)
Discussion started by: friend
2 Replies
6. Shell Programming and Scripting
Hello,
I have a xml file as shown below. I want to parse the file and store data in variables.
xml file looks like:
<TEST NAME="DataBaseurl">jdbc:oracle:thin:@localhost:1521:ora10</TEST>
<TEST NAME="Databaseuser">Pradeep</TEST>
......
and many other such lines
i want to read this file and... (2 Replies)
Discussion started by: pradeepmacha
2 Replies
7. Shell Programming and Scripting
Hello,
I have a huge file, I am currently using while loop to read and do some calculation on it, but it is taking a lot of time.
I want to use AWK to read and do those calculations.
Please suggest.
currently doing:
cat input2 | while read var1
do
num=`echo $var1 | awk... (6 Replies)
Discussion started by: anand2308
6 Replies
8. UNIX for Advanced & Expert Users
I am fairly green using awk so I don't have anything started but what I am trying to do is: I have a file called "contacts" and in the file are 3 fields separate by ;. I want to read each line and send an email script. I have the email function working but just need to know how to setup awk to... (8 Replies)
Discussion started by: ziggy6
8 Replies
9. Shell Programming and Scripting
Hello Friends,
I have written a script like the following, which finds some logs and fetchs some desired rows and then calculate average processing time of a spesific application.
if
then
echo
echo "----- There are three arguments which is expected to run this script! ... (5 Replies)
Discussion started by: EAGL€
5 Replies
10. Shell Programming and Scripting
I have files named with different prefixes. From each I want to extract the first line containing a specific string, and then print that line along with the prefix.
I've tried to do this with a while loop, but instead of printing the prefix I print the first line of the file twice.
Files:... (3 Replies)
Discussion started by: pathunkathunk
3 Replies
LEARN ABOUT SUNOS
rsm_memseg_import_disconnect
rsm_memseg_import_connect(3RSM) Remote Shared Memory Library Functions rsm_memseg_import_connect(3RSM)
NAME
rsm_memseg_import_connect, rsm_memseg_import_disconnect - create or break logical commection between import and export segments
SYNOPSIS
cc [ flag... ] file... -lrsm [ library... ]
#include <rsmapi.h>
int rsm_memseg_import_connect(rsmapi_controller_handle_t controller, rsm_node_id_t nodeid, rsm_memseg_id_t segment_id, rsm_permission_t
perm, rsm_memseg_import_handle_t *memseg);
int rsm_memseg_import_disconnect(rsm_memseg_import_handle_t memseg);
DESCRIPTION
The rsm_memseg_import_connect() function provides a means of creating an import segment called memseg and establishing a logical connection
with an export segment identified by the segment_id on the node specified by node_id. The controller specified by controller must have a
physical connection with the controller (see rsm_get_interconnect_topology(3RSM)) used while exporting the segment identified by segment_id
on node specified by node_id. The perm argument specifies the mode of access that the importer is requesting for this connection. In the
connection process, the mode of access and the importers userid and groupid are compared with the access permissions specified by the
exporter. If the request mode is not valid, the connection request is denied. The perm argument is limited to the following octal values:
0400 read mode
0200 write mode
0600 read/write mode
The rsm_memseg_import_disconnect() function breaks the logical connection between the import segment and the exported segment and deallo-
cates the resources associated with the import segment handle memseg.
RETURN VALUES
Upon successful completion, these functions return 0. Otherwise, an error value is returned to indicate the error.
ERRORS
The rsm_memseg_import_connect() and rsm_memseg_import_disconnect() functions can return the following errors:
RSMERR_BAD_SEG_HNDL Invalid segment handle.
The rsm_memseg_import_connect() function can return the following errors:
RSMERR_BAD_CTLR_HNDL Invalid controller handle.
RSMERR_CTLR_NOT_PRESENT Controller not present.
RSMERR_PERM_DENIED Permission denied.
RSMERR_INSUFFICIENT_MEM Insufficient memory.
RSMERR_INSUFFICIENT_RESOURCES Insufficient resources.
RSMERR_SEG_NOT_PUBLISHED_TO_NODE Segment not published to node.
RSMERR_SEG_NOT_PUBLISHED Segment not published at all.
RSMERR_BAD_ADDR Bad address.
RSMERR_REMOTE_NODE_UNREACHABLE Remote not not reachable.
RSMERR_INTERRUPTED Connection interrupted.
The rsm_memseg_import_disconnect() function can return the following errors:
RSMERR_SEG_STILL_MAPPED Segment still mapped, need to unmap before disconnect.
RSMERR_POLLFD_IN_USE Poll file descriptor in use.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
rsm_memseg_import_map(3RSM), attributes(5)
SunOS 5.10 8 Jun 2001 rsm_memseg_import_connect(3RSM)