10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I am joining two CSV files based on 'Server_Name' column, 1st column of first file and 2nd column of second file.
If matches, output 1st and 2nd column from first file, 3rd,4th,5th,6th columns from second file.
I am expecting output CSV file as below.
Could you please send me help me with... (6 Replies)
Discussion started by: Anadmbt
6 Replies
2. Shell Programming and Scripting
I have a workaround to the problem i m posting, however if someone wants to look at my query and respond ... i will appreciate.
This is in reference to this thread -> https://www.unix.com/shell-programming-and-scripting/267630-extract-between-two-exact-matched-strings.html
I have data.txt as... (11 Replies)
Discussion started by: mohtashims
11 Replies
3. UNIX for Beginners Questions & Answers
Hi,
Below is list of files in my directory.
-rw-rw-r--. 1 Roots Roots 0 Dec 26 06:58 12345_kms_report.csv
-rw-rw-r--. 1 Roots Roots 0 Dec 26 06:59 12346_kms_report.csv
-rw-rw-r--. 1 Roots Roots 0 Dec 26 06:59 12347_kms_report.csv
-rw-rw-r--. 1 Roots Roots 0 Dec 26 06:59... (2 Replies)
Discussion started by: Balraj
2 Replies
4. Shell Programming and Scripting
cat clinvar_00-latest.vcf | perl -aF/\\t/ -lne '/CLNSRCID=(\d+)/ and print join("\t",@F,$1)' > OMIM.txt
The above code finds the text CLNSRCID=, but only outputs those records in which there is a numerical value only.
For example, the first match is CLNSRCID=103320.0001 in line 4 of the... (1 Reply)
Discussion started by: cmccabe
1 Replies
5. UNIX Desktop Questions & Answers
Hello,
I would like to ask you, how to match directory names. I need to find only directories, which are created only from numbers and doesn't include any letters.
I used command
find $AC_WORKDIR/work_archive/test/$dirs_years -maxdepth 1 -name \\* -print
If I have dirs like
12... (3 Replies)
Discussion started by: satin1321
3 Replies
6. Shell Programming and Scripting
hi I juts want to know if there is a command that checks if an ethernet port corresponds to a network card.
ex. I have 3 network cards, one is two ports, and the other two 8 ports.
How do I know that eth0 corresponds to the the two-port network card and eth9 corresponds to the first 8-port... (2 Replies)
Discussion started by: h0ujun
2 Replies
7. Shell Programming and Scripting
I am debugging a script and have stuck up at one code line
awk -F , '{if (match($3,001)) { print $2 } }' Master20120307090511.tmp
The Master20120307090511.tmp is
001,ARE , 001
002,ARE , 002
003,ARE , 003
006,ARE , 006
011,ARE , 011
012,ARE , 012
What happens is when i fire this ... (5 Replies)
Discussion started by: vee_789
5 Replies
8. Shell Programming and Scripting
i am matching two files.
the files are in the format
file_1.txt
1|_|X|_|
2|_|W|_|
3|_|Y|_|
4|_|Z|_|
5|_|U|_|
file_2.txt
W|_|A|_|
Z|_|C|_|
V|_|B|_|
X|_|D|_|sdff|_|
Y|_|
file_3.txt should be in the format (4 Replies)
Discussion started by: centurion_13
4 Replies
9. Shell Programming and Scripting
Hello,
I would like to write a sed comman dwith pattern matching .to match those record which have some character(userd id) present in it.
Example :
Logfile contents --
127.0.0.1 - - "POST /cgi-bin/cgi-module-example.pl HTTP/1.1" 200 1866
127.0.0.1 - - "POST... (4 Replies)
Discussion started by: jambesh
4 Replies
10. Shell Programming and Scripting
hi,
how can i make use of a command in the replacement segment..
cat a | sed '/^*]\{3\}$/{
s/\(.*\)/REPLACEMENT/g
}'
suppose if I want to use a awk command in the replacement section , how to achieve that ?
Thanks (1 Reply)
Discussion started by: AbhishekG
1 Replies
it_tpg_create(3ISCSIT) iSCSI Management Library Functions it_tpg_create(3ISCSIT)
NAME
it_tpg_create, it_tpg_delete, it_tpg_free - create and delete iSCSI target portal groups
SYNOPSIS
cc [ flag... ] file... -liscsit [ library... ]
#include <libiscsit.h>
int it_tpg_create(it_config_t *cfg, it_tpg_t **tpg,
char *tpg_name, char *portal_ip_port);
int it_tpg_delete(it_config_t *cfg, it_tpg_t *tpg,
boolean_t force););
void it_tpg_free(it_tpg_t *tpg);
PARAMETERS
cfg a pointer t the iSCSI configuration structure
tpg a pointer to the it_tpg_t structure representing the target portal group
tpg_name an identifier for the target portal group
portal_ip_port a string containing an appropriately formatted IP address:port. Both IPv4 and IPv6 addresses are permitted. This value
becomes the first portal in the target portal group. Applications can add additional values using it_portal_create(3ISC-
SIT) before committing the target portal group. IPv6 addresses should be enclosed in square brackets ('[', ']').
force boolean value indicating if the target portal group should be removed even if it is associated with one or more targets.
If not B_TRUE, the operation will fail if the target product group is associated with a target.
DESCRIPTION
The it_tpg_create() function allocates and creates an it_tpg_t structure representing a new iSCSI target portal group. The new it_tpg_t
structure is added to the global tpg list (cfg_tgt_list) in the it_config_t structure.
The it_tpg_delete() function deletes the target portal group represented by tpg, where tpg is an existing it_tpg_t structure within the
global configuration cfg.
The it_tpg_free() function deallocates resources associated with an it_tpg_t structure. If tpg->next is not NULL, this function frees all
members of the list.
Configuration changes as a result of these functions are not instantiated until the modified configuration is committed by calling it_con-
fig_commit(3ISCSIT).
RETURN VALUES
The it_tpg_create() and it_tpg_delete() functions return 0 on success and an error value on failure.
ERRORS
The it_tpg_create() and it_tpg_delete() functions will fail if:
EBUSY The portal group is associated with one or more targets.
EEXIST The portal was already configured for another portal group associated with this target.
EINVAL A parameter is invalid.
ENOMEM Resources could not be allocated.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Committed |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
it_config_commit(3ISCSIT), it_ini_create(3ISCSIT), it_portal_create(3ISCSIT), it_tgt_create(3ISCSIT), libiscsit(3LIB), libnvpair(3LIB),
libstmf(3LIB), attributes(5)
SunOS 5.11 1 Oct 2008 it_tpg_create(3ISCSIT)