I need help to parse a file where there are many records, all of which are consistently separated by lines containing “^=============” and "^ End of Report".
Example:
=============
1
2
3
4
End of record
=============
1
3
4
End of record
Etc....
I only need specific lines... (5 Replies)
Hi,
I am trying to locate the occurences of certain pattern like 'Possible network disconnect' in a text file. I can get the actual lines matching the pttern using:
grep -w 'Possible network disconnect' file_name.
But I am more interested in getting the timing of these events which are... (7 Replies)
i have a file in following format
1 32 3
4 6 4
4 45 1
45 4 61
54 66 4
5 65 51
56 65 1
12 32 85
now here the total number of lines are 8(they vary each time)
Now i want to select only those lines in which the values... (6 Replies)
Hi everyone,
I have two files (A and B) and want to combine them to one by always taking 10 rows from file A and subsequently 6 lines from file B. This process shall be repeated 40 times (file A = 400 lines; file B = 240 lines).
Does anybody have an idea how to do that using perl, awk or sed?... (6 Replies)
Hi All,
I have a very huge file (4GB) which has duplicate lines. I want to delete duplicate lines leaving unique lines. Sort, uniq, awk '!x++' are not working as its running out of buffer space.
I dont know if this works : I want to read each line of the File in a For Loop, and want to... (16 Replies)
hi,
i have two files.
file1.sh
echo "unix"
echo "linux"
file2.sh
echo "unix linux forums"
now the output i need is
$./file2.sh
unix linux forums (3 Replies)
Hi
this is my SQL script
$ wc -l insert_into_customers.sql
85601 insert_into_customers.sqlI wish to cut this file into 9 files each 10000 lines (the last one less)
$ wc -l insert_into_customers_00*.sql
10000 insert_into_customers_001.sql
10000 insert_into_customers_002.sql
... (1 Reply)
I have a file where every line includes four expressions with a caret in the middle (plus some other "words" or fields, always separated by spaces). I would like to extract from this file, all those lines such that each of the four expressions containing a caret appears in at least four different... (9 Replies)
Hi..
I need some help in converting the below horizontal lines to vertical lines format.
can anyone help me on this.
input file
Hour,1,2,3,4,5
90RT,106,111,111,112,111
output file
Hour,90RT
1,106
2,111
3,111
4,112
5,111 (3 Replies)
Discussion started by: Raghuram717
3 Replies
LEARN ABOUT MINIX
systemd-cat
SYSTEMD-CAT(1) systemd-cat SYSTEMD-CAT(1)NAME
systemd-cat - Connect a pipeline or program's output with the journal
SYNOPSIS
systemd-cat [OPTIONS...] [COMMAND] [ARGUMENTS...]
systemd-cat [OPTIONS...]
DESCRIPTION
systemd-cat may be used to connect the standard input and output of a process to the journal, or as a filter tool in a shell pipeline to
pass the output the previous pipeline element generates to the journal.
If no parameter is passed, systemd-cat will write everything it reads from standard input (stdin) to the journal.
If parameters are passed, they are executed as command line with standard output (stdout) and standard error output (stderr) connected to
the journal, so that all it writes is stored in the journal.
OPTIONS
The following options are understood:
-h, --help
Print a short help text and exit.
--version
Print a short version string and exit.
-t, --identifier=
Specify a short string that is used to identify the logging tool. If not specified, no identification string is written to the journal.
-p, --priority=
Specify the default priority level for the logged messages. Pass one of "emerg", "alert", "crit", "err", "warning", "notice", "info",
"debug", or a value between 0 and 7 (corresponding to the same named levels). These priority values are the same as defined by
syslog(3). Defaults to "info". Note that this simply controls the default, individual lines may be logged with different levels if they
are prefixed accordingly. For details, see --level-prefix= below.
--level-prefix=
Controls whether lines read are parsed for syslog priority level prefixes. If enabled (the default), a line prefixed with a priority
prefix such as "<5>" is logged at priority 5 ("notice"), and similar for the other priority levels. Takes a boolean argument.
EXIT STATUS
On success, 0 is returned, a non-zero failure code otherwise.
EXAMPLES
Example 1. Invoke a program
This calls /bin/ls with standard output and error connected to the journal:
# systemd-cat ls
Example 2. Usage in a shell pipeline
This builds a shell pipeline also invoking /bin/ls and writes the output it generates to the journal:
# ls | systemd-cat
Even though the two examples have very similar effects the first is preferable since only one process is running at a time, and both stdout
and stderr are captured while in the second example, only stdout is captured.
SEE ALSO systemd(1), systemctl(1), logger(1)systemd 237SYSTEMD-CAT(1)