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
MOUNT_PORTAL(8) 					    BSD System Manager's Manual 					   MOUNT_PORTAL(8)

NAME
mount_portal -- mount the portal daemon SYNOPSIS
mount_portal [-o options] /etc/portal.conf mount_point DESCRIPTION
The mount_portal command attaches an instance of the portal daemon to the global filesystem namespace. The conventional mount point is /p. The directory specified by mount_point is converted to an absolute path before use. This command is normally executed by mount(8) at boot time. The options are as follows: -o Options are specified with a -o flag followed by a comma separated string of options. See the mount(8) man page for possible options and their meanings. The portal daemon provides an open service. Objects opened under the portal mount point are dynamically created by the portal daemon accord- ing to rules specified in the named configuration file. Using this mechanism allows descriptors such as sockets to be made available in the filesystem namespace. The portal daemon works by being passed the full pathname of the object being opened. The daemon creates an appropriate descriptor according to the rules in the configuration file, and then passes the descriptor back to the calling process as the result of the open system call. NAMESPACE
By convention, the portal daemon divides the namespace into sub-namespaces, each of which handles objects of a particular type. Currently, four sub-namespaces are implemented: tcp, fs, rfilter and wfilter. The tcp namespace takes a hostname and a port (slash sepa- rated) and creates an open TCP/IP connection. The fs namespace opens the named file, starting back at the root directory. This can be used to provide a controlled escape path from a chrooted environment. The rfilter and wfilter namespaces open a pipe to a process, typically a data-filter such as compression or decompression programs. The rfilter namespace opens a read-only pipe, while the wfilter namespace opens a write-only pipe. See the EXAMPLES section below for more exam- ples. CONFIGURATION FILE
The configuration file contains a list of rules. Each rule takes one line and consists of two or more whitespace separated fields. A hash (``#'') character causes the remainder of a line to be ignored. Blank lines are ignored. The first field is a pathname prefix to match against the requested pathname. If a match is found, the second field tells the daemon what type of object to create. Subsequent fields are passed to the creation function. The rfilter and wfilter namespaces have additional meanings for the remaining fields. The third field specifies a prefix that is to be stripped off of the passed name before passing it on to the pipe program. If the prefix does not match, no stripping is performed. The fourth argument specifies the program to use for the pipe. Any remaining fields are passed to the pipe program. If the string ``%s'' exists within these remaining fields, it will be replaced by the path after stripping is performed. If there is no field after the program name, ``%s'' will be assumed, to maintain similarity with the tcp and fs namespaces. FILES
/p/* EXAMPLES
A tutorial and several examples are provided in /usr/share/examples/mount_portal. The following is an example configuration file. # @(#)portal.conf 5.1 (Berkeley) 7/13/92 tcp/ tcp tcp/ fs/ file fs/ echo/ rfilter echo/ echo %s echo_nostrip/ rfilter nostrip echo %s echo_noslash rfilter echo_noslash echo %s gzcat/ rfilter gzcat/ gzcat %s gzip/ wfilter gzip/ gzip > %s gzip9/ wfilter gzip9/ gzip -9 > %s ftp/ rfilter ftp/ ftp -Vo - %s ftp:// rfilter nostrip ftp -Vo - %s http:// rfilter nostrip ftp -Vo - %s bzcat/ rfilter bzcat/ bzcat %s nroff/ rfilter nroff/ nroff -man %s As is true with many other filesystems, a weird sense of humor is handy. Notice that after the keynames, like nroff/ and bzcat/, we typically use another slash. In reality, the mount_portal process changes direc- tory to /, which makes the subsequent slash unnecessary. However, the extra slash provides a visual hint that we are not operating on an ordinary file. An alternative would be to change the configuration file to something like: nroff% rfilter nroff% nroff -man One might then use less /p/nroff%/usr/share/man/man8/mount_portal.8 SEE ALSO
mount(2), unmount(2), fstab(5), mount(8) HISTORY
The mount_portal utility first appeared in 4.4BSD. The rfilter and wfilter capabilities first appeared in NetBSD 1.5. The portal kernel driver was removed and mount_portal was converted to use puffs(3) in NetBSD 6.0. BUGS
This filesystem may not be NFS-exported. BSD
December 5, 2009 BSD