Sponsored Content
Top Forums UNIX for Dummies Questions & Answers why output consists of 3 values Post 302681873 by Corona688 on Saturday 4th of August 2012 05:55:05 PM
Old 08-04-2012
[] is a range of characters to match.

You are telling it to match any line which contains the characters d, a, t, a, f, e, e, d, ., p, h, p.

So, any line which contains p will match.

Any line which contains e will also match.

Any line which contains . will also match.

Any line which contains d will also match.

And so forth.

Leave off the [], and escape the . with \, to match the name 'datafeed.php'.
This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

assign values from awk output - help

Dear All, I have a command which gives the number of fields of each line of a comma-separated file. sthng like this : cat QDB_20071126_002.bad | awk -F"," '{ print NF }' I need to assign the first output and the last output of the above command to variables in a script. Need help to do... (4 Replies)
Discussion started by: KrishnaSaran
4 Replies

2. AIX

fr and sr (from vmstat output) values are very high

Hi AIX Expert, the fr (page freed/page replacement) and sr (pages scanned by page-replacement algorithm) values from the vmstat output (see below please) are very high. I usually see this high value during the oracle database backup. In addition, the page scan/page steal/ page faults values... (7 Replies)
Discussion started by: Beginer0705
7 Replies

3. Shell Programming and Scripting

Store the output values in array

Hi, How to store the values in array from output result, EG: I have the result like this, ps, google, 1.txt, 1 sam, google, 2.txt, 2 These are the four values followed by comma in two sets. I need to store these values set by set. One set contains four values followed by comma. ... (2 Replies)
Discussion started by: KarthikPS
2 Replies

4. Shell Programming and Scripting

Is it possible to extract these values from the output

Hi, I would like to search based of "java" and "-Dplatform.home=" and store these two values in bash variables. ps -xef | grep <pid> wlsuser 15160 15144 0 Feb 20 ? 17:27 /app1/jdk150_07/bin/IA64N/java -server -Xms1536m -Dplatform.home=/app1/bea/weblogic92... (13 Replies)
Discussion started by: mohtashims
13 Replies

5. Shell Programming and Scripting

Extract multiple values from a tnsping output

Hi all, Can anyone help with the following request? I need to extract HOST value, SERVICE_NAME and msec value from a tnsping output and append to a file. The tnsping output is typically as follows: Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS =... (4 Replies)
Discussion started by: jonnyd
4 Replies

6. Shell Programming and Scripting

Sorting out unique values from output of for loop.

Hi , i have a belwo script which is used to get sectors per track value extarcted from Solaris machine: for DISK in /dev/dsk/c*t*d*s*; do value=`prtvtoc "$DISK" | sed -n -e '/Dimensions/,/Flags/{/Dimensions/d; /Flags/d; p; }' | sed -n -e '/sectors\/track/p'`; if ; then echo... (4 Replies)
Discussion started by: omkar.jadhav
4 Replies

7. UNIX for Dummies Questions & Answers

Different values output between du and df

Dear Gurus I have a doubt: Why df -h command shows me that /opt FS has used 3.0G: # df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 9.7G 5.8G 3.5G 63% / /dev/mapper/VolGroup00-LogVol05 226G 171G... (4 Replies)
Discussion started by: orma
4 Replies

8. UNIX for Dummies Questions & Answers

Maximum of the values from the output a query

Following is the output of a command ran inside the script: 2015-01-29-05-38-02 5 2015-01-29-05-38-02 5 2015-01-29-05-38-02 5 2015-01-29-05-38-02 5 2015-01-29-05-38-02 5 2015-01-29-05-38-03 5 2015-01-29-05-38-03 5 2015-01-29-05-38-03 5 2015-01-29-05-38-03 5 2015-01-29-05-38-03 5... (8 Replies)
Discussion started by: Devendra Hupri
8 Replies

9. Solaris

Asvc_t values in iostat output

Noticed that asvc_t values in iostat command outputs are mostly more than 100 in our previous iostat analysis. Also found the following detail from an alternate site IO Bottleneck - Disk performance issue - UnixArena ---- 1. asvc_t average service time of active transactions, in... (2 Replies)
Discussion started by: saraperu
2 Replies

10. Shell Programming and Scripting

Find values within range and output

Dear All, I am stacked and I ask for your help. Briefly, I have two files, one like this one (file1): 1 101 5 1 102 6 1 103 2 1 104 9 1 105 10 2 301 89 2 302 4 2 303 13 2 304 34 2 305 1 and the other like this one (file2): 1 103 2 303well, what I am trying to do is obtain a... (2 Replies)
Discussion started by: giuliangiuseppe
2 Replies
MATCH(1L)						      Schily's USER COMMANDS							 MATCH(1L)

NAME
match - searches for patterns in files SYNOPSIS
match [ -option ] pattern [ file ... ] DESCRIPTION
Match searches the named files or standard input (if no filenames are given) for the occurrences of the given pattern on each line. The program accepts literal characters or special pattern matching characters. All lines that match the pattern are output on standard output. You can only specify one pattern string for each match, however, you can construct an arbitrarily complex string. When you do not specify a file, match can be used as a filter to display desired lines. Standard in is used if no files are specified. OPTIONS
-not, -v Prints all lines that do not match. -i Ignore the case of letters -m Force not to use the magic mode -w Search for pattern as a word -x Display only those lines which match exactly -c Display matching count for each file -l Display name of each file which matches -s Be silent indicate match in exit code -h Do not display filenames -n Precede matching lines with line number (with respect to the input file) -b Precede matching lines with block number REGULAR EXPRESSIONS
The following is a table of all the pattern matching characters: c An ordinary character (not one of the special characters discussed below) is a one character regular expression that matches that character. c A backslash () followed by any special character is a one character regular expression that matches the special character itself. The special characters are: ! # % * { } [ ] ? ^ $ ! Logical OR as in match this!that!the_other. You may have to use `{}' for precedence grouping. # A hash mark followed by any regular expression matches any number (including zero) occurrences of the regular expression. ? Matches exactly any one character. W? matches Wa, Wb, Wc, W1, W2, W3 ... * Matches any number of any character. % Matches exactly nothing. It can be used in groups of ored patterns to specify that an empty alternative is possible. {} Curly brackets may be used to enclose patterns to specify a precedence grouping, and may be nested. {%!{test}}version matches the strings testversion and version. [string] A non empty string of characters enclosed in square brackets is a one character regular expression that matches any one character in that string. If however the first character of the string is a circumflex (^), the one character expression matches any character which is not in the string. The ^ has this special meaning only if it occurs first in the string. The minus (-) may be used to indi- cate a range of consecutive ASCII characters; for example, [0-9] is equivalent to any one of the digits. The - loses it's special meaning if it occurs first (after an initial ^, if any) or last in the string. The right square bracket (]) and the backslash () must be quoted with a backslash if you want to use it within the string. ^ Matches the beginning of a line. $ Matches the end of a line. (^*$ matches any entire line) EXAMPLES
FILES
None. SEE ALSO
grep(1), fgrep(1), egrep(1) DIAGNOSTICS
NOTES
Even if a match occurs more than once per line, the line is output only once. Quote special pattern matching characters to prevent them from being expanded by the Command Interpreter. BUGS
The length of the pattern is currently limited to 100 characters. This limit is reduced by 38 if the -w option is used. Joerg Schilling 15. Juli 1988 MATCH(1L)
All times are GMT -4. The time now is 02:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy