10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to read the log file which was generate from other command . And the output was having multi line in log files for job name and server name. But i need to make all the logs on one line
07/15/2018 17:02:00 TRANSLOG_1700 Server0005_SQL ... (2 Replies)
Discussion started by: ranjancom2000
2. Shell Programming and Scripting
Desired Output File
>Seq2 (4 Replies)
Discussion started by: patrick87
3. UNIX for Beginners Questions & Answers
example of problem:
when I echo "$e" >> /home/cogiz/file.txt
result prints to file as:AA
I need it to save to file as this:AA BB CC
I know it's probably something really simple but any help would be greatly appreciated.
Cogiz (7 Replies)
Discussion started by: cogiz
4. UNIX for Dummies Questions & Answers
I am trying to remove multi line and single line comments like examples below
I have tried this pattern. it works fine for single line comments and multi line comments in a single line only. but this fails when the comments are extended in multiple lines as shown in the comment 2 of... (3 Replies)
Discussion started by: ahmedwaseem2000
5. Shell Programming and Scripting
My Oracle query is returing below o/p
Ins trnas value
a lkp1 x
a lkp1 y
b lkp1 a
b lkp2 x
b lkp2 y ... (7 Replies)
Discussion started by: gvk25
6. Shell Programming and Scripting
I did do a search and the past threads doesn't really solve my issue. (using various awk commands)
I need to combine the output from java -version into 1 line, but I am having difficulties.
When you exec java -version, you get:
java version "1.5.0_06"
Java(TM) 2 Runtime... (5 Replies)
Discussion started by: flagman5
7. Shell Programming and Scripting
Did anyone know how to write a perl script to merge the multi-line into a single line where each line with start at timestamp
cc; (5 Replies)
Discussion started by: happyday
8. Shell Programming and Scripting
Can anyone know how to use perl to merge the following multi-line information which beginning with "BAM" into one line. For each line need to delete the return and add a space. Please see the red color line.
BAM admin 220.127.116.11 ... (3 Replies)
Discussion started by: happyday
9. Shell Programming and Scripting
I'm working on something that will use snmpwalk to query the devices on my network and retreive the device name, device IP, device model and device serial. I'm using Nmap for the enumeration and sed to clean up the results for use by snmpwalk. Once i get all the data organized I'm... (8 Replies)
Discussion started by: mitch
10. Shell Programming and Scripting
Basically I wanna take grep output,
EACH_OPTION_CHARGE: V033*, VMVM, 4.00, M
EACH_OPTION_CHARGE: V040*, VMVM, 4.00, M
EACH_OPTION_CHARGE: V042*, VMVM, 4.50, M
EACH_OPTION_CHARGE: V043*, VMVM, 5.00, M
EACH_OPTION_CHARGE: V050*, VMVM, 4.00, M
EACH_OPTION_CHARGE: V052*,... (1 Reply)
Discussion started by: djsal
UNIQ(1) BSD General Commands Manual UNIQ(1)
uniq -- report or filter out repeated lines in a file
uniq [-c | -d | -u] [-i] [-f num] [-s chars] [input_file [output_file]]
The uniq utility reads the specified input_file comparing adjacent lines, and writes a copy of each unique input line to the output_file. If
input_file is a single dash ('-') or absent, the standard input is read. If output_file is absent, standard output is used for output. The
second and succeeding copies of identical adjacent input lines are not written. Repeated lines in the input will not be detected if they are
not adjacent, so it may be necessary to sort the files first.
The following options are available:
-c Precede each output line with the count of the number of times the line occurred in the input, followed by a single space.
-d Only output lines that are repeated in the input.
-f num Ignore the first num fields in each input line when doing comparisons. A field is a string of non-blank characters separated from
adjacent fields by blanks. Field numbers are one based, i.e. the first field is field one.
Ignore the first chars characters in each input line when doing comparisons. If specified in conjunction with the -f option, the
first chars characters after the first num fields will be ignored. Character numbers are one based, i.e. the first character is
-u Only output lines that are not repeated in the input.
-i Case insensitive comparison of lines.
The uniq utility exits 0 on success, and >0 if an error occurs.
The historic +number and -number options have been deprecated but are still supported in this implementation.
The uniq utility is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible.
A uniq command appeared in Version 3 AT&T UNIX.
June 6, 1993 BSD