Today (Saturday) We will make some minor tuning adjustments to MySQL.

You may experience 2 up to 10 seconds "glitch time" when we restart MySQL. We expect to make these adjustments around 1AM Eastern Daylight Saving Time (EDT) US.

How to add certain pattern to an output..?

Login or Register to Reply

Thread Tools Search this Thread
# 8  
Using awk

To get exact ouptu as you want with the the file name for which you are trying to get,

awk '{ line++; } END { print FILENAME" "line}' filename

Login or Register to Reply

Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Pattern Matching and creating output
HI Unix Forum, My requirement I have two set of Patterns UBA and CIE for which different Phases are there which will have Start and End time. They are not in same order. I want the o/p in the below mentioned format. Eg: Mangolia Alien 03:04:56 Phase 0 started (10...... Shell Programming and Scripting
Shell Programming and Scripting
How to use awk to output such a pattern?
Hi all, I want to output the following pattern in a comma separted format, but am not able to do it. Table1.FIND.Value= 124 Data Data Data Data Data Table1.FIND.Value =256 Data Data Data Data Data The outPut i expect is... Shell Programming and Scripting
Shell Programming and Scripting
Pattern output
Hi All, Seeking for your assistance on how to get the two pattern below. Example file1.txt GET /Sun/Cellular/version1/12 HTTP/1.0 100 Internal Error GET /Sun/Cellular/version1 GET /Sun/Cellular/version1 GET /Sun/Cellular/version1 GET /Sun/Cellular/version1/13 HTTP/1.0 100 Internal...... Shell Programming and Scripting
Shell Programming and Scripting
Displaying log file pattern output in tabular form output
Hi All, I have result log file which looks like this (below): from the content need to consolidate the result and put it in tabular form 1). Intercomponents Checking Passed: All Server are passed. ====================================================================== 2). OS version Checking...... Shell Programming and Scripting
Shell Programming and Scripting
How to search pattern and add that pattern in next line
Hi All, I am new to shell scripting and need help in scripting using CSH. Here is what I am trying to so, 1. Search a specific string e.g. "task" from "task (input1, out1)". 2. Extract the arguements "input1" and "out1" 3. Add them in separate lines below. eg. "int input1" , " integer out1" ...... Shell Programming and Scripting
Shell Programming and Scripting
GIT-CHECK-IGNORE(1)						    Git Manual						       GIT-CHECK-IGNORE(1)

git-check-ignore - Debug gitignore / exclude files
git check-ignore [options] pathname... git check-ignore [options] --stdin < <list-of-paths>
For each pathname given via the command-line or from a file via --stdin, show the pattern from .gitignore (or other input files to the exclude mechanism) that decides if the pathname is excluded or included. Later patterns within a file take precedence over earlier ones.
-q, --quiet Don't output anything, just set exit status. This is only valid with a single pathname. -v, --verbose Also output details about the matching pattern (if any) for each given pathname. --stdin Read file names from stdin instead of from the command-line. -z The output format is modified to be machine-parseable (see below). If --stdin is also given, input paths are separated with a NUL character instead of a linefeed character.
By default, any of the given pathnames which match an ignore pattern will be output, one per line. If no pattern matches a given path, nothing will be output for that path; this means that path will not be ignored. If --verbose is specified, the output is a series of lines of the form: <source> <COLON> <linenum> <COLON> <pattern> <HT> <pathname> <pathname> is the path of a file being queried, <pattern> is the matching pattern, <source> is the pattern's source file, and <linenum> is the line number of the pattern within that source. If the pattern contained a ! prefix or / suffix, it will be preserved in the output. <source> will be an absolute path when referring to the file configured by core.excludesfile, or relative to the repository root when referring to .git/info/exclude or a per-directory exclude file. If -z is specified, the pathnames in the output are delimited by the null character; if --verbose is also specified then null characters are also used instead of colons and hard tabs: <source> <NULL> <linenum> <NULL> <pattern> <NULL> <pathname> <NULL>
0 One or more of the provided paths is ignored. 1 None of the provided paths are ignored. 128 A fatal error was encountered.
gitignore(5) gitconfig(5) git-ls-files(5)
Part of the git(1) suite Git 06/10/2014 GIT-CHECK-IGNORE(1)

Featured Tech Videos