Match O/p of a command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Match O/p of a command
# 8  
Old 12-27-2013
Thank you for the reply.

I tried both the options provided by Rudic and Scrutinizer

However, when i ran it - it will stuck as the script will prompt for username and password.

---------- Post updated 12-28-13 at 12:21 AM ---------- Previous update was 12-27-13 at 11:29 PM ----------

I tried both the options given by Rudic and Scrutinizer. However, it hangs bcoz in the script it asks for username and password.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

UNIX Command to Match columns from two csv files

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

Match exact String with sed command

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

Find command with Metacharacter (*) Should match exact filename

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

String match, with perl command

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

[SOLVED] find command match pattern

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

command to match ethernet port to network card

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

Logic Explanation of Match command in Linux

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

match 2 files using nawk command

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

sed command to match log entries

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

how to use a command in sed s/match/replacement

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
Login or Register to Ask a Question
istgtcontrol(1) 					      General Commands Manual						   istgtcontrol(1)

NAME
istgtcontrol - istgt iSCSI target command utility SYNOPSIS
istgtcontrol [options] <command> [<file>] DESCRIPTION
istgtcontrol is a command and control utility for istgt(1). It can be used to query and change the status of a local or remote istgt instance. istgtcontrol supports the commands denoted below to interact with the istgt instance. By default it connects and authenticates to the iSCSI target portal specified in the istgtcontrol.conf configuration file and uses CHAP credentials denoted there, if any. Both can be overrid- den by using the respecitve command line arguments. COMMANDS
istgtcontrol understands the following commands which can be forwarded to istgt: noop Do not actually do anything, but test responsiveness of the portal and test CHAP credentials only. version Retrieve the istgt version number providing the iSCSI portal istgtcontrol connected to. list List all, or the specified targets only, which shared by the portal. load Load a new media to the specified unit. This command issues the same command as if a drive tray had been closed on a SCSI device. unload Unload a media from the specified unit. This command issues the same command as if the drive tray had been opened from a SCSI device. change file Change the loaded media by the specified unit. This command is equivalent as if a new media (for example a DVD-ROM or tape car- tridge) had been inserted in the SCSI drive. The "file" argument is interpreted as filename to be loaded. reset Reset the specified LUN of the portal. info Display all connections of the portal OPTIONS
-c config Use specified file as configuration file instead of the default file. -h host Override the target portal by the specified host name or IP address. This defaults to "localhost" if no other host was specified in the configuration file. -p port Override the target portal port by the specified port number. This defaults to "3261" if no other port was specified in the configu- ration file. -t target Specifies the target IQN which should be affected by the command given. There may be a default given in the configuration file. The keyword "all" is accepted by some commands and matches all exported volumes. -l lun Specifies the target LUN which should be affected by the command given. This defaults to "0" unless another default was provided in the configuration file. -f flags Specifies flags passed to the portal when loading a new media. This defaults to "ro". Supported flags are: "ro", "rw", "extend" and "dynamic". -s size Specifies the size of the meda to be loaded. The default is to auto-detect the media size. -q Quiet mode, supress non-critical outputs. -v Verbose mode, gives more output during operations. -A method Sets the preferred authentication method for logging in to the portal. This overrides any method specified in the configuration file. Supported methods are either CHAP/Mutual or CHAP/Auto. -U user Sets the user to authenticate on the portal. This overrides any username specified in the configuration file. -S secret Set the secret used to authenticate on the portal. This overrides any secret specified in the configuration file. -M muser Set the mutual authentication user. This overrides any user specified in the configuration file. -R msecret Set the mutual authentication secret. This overrides any secret specified in the configuration file. -H Display a brief usage summary and exit. -V Display the istgtcontrol version number and exit. FILES /etc/istgt/istgtcontrol.conf Configuration file SEE ALSO
istgt(1) AUTHORS
Daisuke Aoyama <aoyama@peach.ne.jp> This manual page was written by Arno Toll (<debian@toell.net>) for the Debian GNU/kFreeBSD system (but may be used by others). istgtcontrol Oct 07, 2011 istgtcontrol(1)