Hi,
I have a file containing a single field on every row. What I need is to append one on to the end of another, e.g.
The input file looks like this:
nnnnn
mmmmmm
nnnnn
mmmmmm
I need it to look like this:
nnnnn mmmmmm
nnnnn mmmmmm
Any ideas would be much appreciated,... (8 Replies)
I have a few lines like --
feature 1,
subfeat 0,
type 3,
subtype 1,
value 0,
--
feature 1,
subfeat 0,
type 1,
subtype 1,
value 0,
I would like to concatenate the... (1 Reply)
Hi All,
I want to merge two consecutive lines.
Currently the output is :-->
crmplp1 cmis461 No Online
cmis462 No Offline
crmplp2 cmis462 No Online
cmis463 No ... (6 Replies)
Hi Gurus,
I have a file say for ex. file1 which has 3500 lines in it which are different account numbers and another file (file2) which has 230000 lines in it. I want to read all the lines in file1 and delete all those lines from file2 which has that same pattern as in file1. I am not quite... (4 Replies)
I have a file name in $f. If $f has "-" at the beginning, or "=", or does not have extension ".ry" or ".xt" or ".dat" then cerr would not be empty.
Tried the following but having some problems.
set cerr = `echo $f | awk '/^-|=|!.ry|!.xt|!.dat/'` (4 Replies)
Hello - First post here. I need help combining two lines that are non-consecutive in a file. Using sed, awk or perl preferably. So the file looks as follows. Please note, the "Line#:" is there only for reference. The lines can only be distinguished by whether they have "start" or "done" in... (2 Replies)
Hi Guys,
I have file like below, I want to print all lines between test1231233 to its 10 occurrence(till line 41)
test1231233
qwe
qwe
qweq123
test1231233
qwe
qwe
qweq23
test1231233
qwe
qwe
qweq123
test1231233
qwe
qwe
qweq123131 (3 Replies)
Delete patterns matching
OS version: RHEL 7.3
Shell : Bash
I have a file like below (pattern.txt). I need to delete all lines starting with the following words (words separated by comma below) and ) character.
LOGGING, NOCOMPRESS, TABLESPACE , PCTFREE, INITRANS, MAXTRANS, STORAGE,... (3 Replies)
Discussion started by: John K
3 Replies
LEARN ABOUT SUSE
match
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)