10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi, I need to print lines which are matching with start pattern "SELECT" and END PATTERN ";" and only select the last "select" statement including the ";" .
I have attached sample input file and the desired input should be as:
INPUT FORMAT:
SELECT
ABCD,
DEFGH,
DFGHJ,
JKLMN,
AXCVB,... (5 Replies)
Discussion started by: nani2019
5 Replies
2. UNIX for Beginners Questions & Answers
I have a directory of files, I can show the number of lines in each file and order them from lowest to highest with:
wc -l *|sort
15263 Image.txt
16401 reference.txt
40459 richtexteditor.txt
How can I also print the number of unique lines in each file?
15263 1401 Image.txt
16401... (15 Replies)
Discussion started by: spacegoose
15 Replies
3. Shell Programming and Scripting
Oracle Linux 6.4
In a directory I have more than 300 files with the extension .log
I want the first 5 and last 5 lines of these .log files to be printed on screen with each file's name.
Expected output :
Printing first 5 and last 5 lines of FX_WT_Feb8_2014.log
!! Authentication... (7 Replies)
Discussion started by: kraljic
7 Replies
4. Shell Programming and Scripting
Hi,
I have a folder with multiple (< 33) .log files.
And I have to copy the lines between two patterns from all the .log files to a new file.
(script file with a loop?)
Thanks in advance.
1.log
...
..
xx1> begin
...
..
..
>>> Total: 2 Alarms
..
.. (17 Replies)
Discussion started by: AK47
17 Replies
5. Shell Programming and Scripting
Hi,
I have 2 large log files in .gz format
file 1 contains
abcde
12345
23456
.
.
.
.
.
.
.
.
09123 (8 Replies)
Discussion started by: aravindj80
8 Replies
6. Shell Programming and Scripting
Hi,
i have an input text file like this:
Student 1
maths
science
=
Student 2
maths
science
=
Student 3
maths
science
i would like to print each student information into separate files, each student id is separated by "=". (1 Reply)
Discussion started by: saint2006
1 Replies
7. Shell Programming and Scripting
Hi all,
This should be very easy but I can't figure it out...
I have a file that looks like this:
@SRR057408.1 FW8Y5CK02R652T length=34
AGCAGTGGTATCAACGCAGAGTAAGCAGTGGTAT
+SRR057408.1 FW8Y5CK02R652T length=34
FIIHFF6666?=:88@@@BBD:::?@ABBAAA>8
@SRR057408.2 FW8Y5CK02TBMHV length=52... (1 Reply)
Discussion started by: kmkocot
1 Replies
8. Shell Programming and Scripting
Hi All,
File that I have:
<ct>
<name>group
<value>1
<value>2
<value>3
</ct>-->file
The output that I needed is
<ct>
<name>group
<value>1 -->file1
<ct>
<name>group
<value>2 -->file2 (6 Replies)
Discussion started by: natalie23
6 Replies
9. Shell Programming and Scripting
I have two files like this:
#FILE 1
ABCD 4322 26485
JMTJ 5311 97248
XMPJ 4321 58978
#FILE 2
ABCD 4321 26485
JMTJ 5311 97248
XMPJ 4321 68978
What to do: Compare the two files and find those lines that doesn't match. And have a new file like this:
#FILE 3
"from file 1"
ABCD 4322 26485... (11 Replies)
Discussion started by: kingpeejay
11 Replies
10. Shell Programming and Scripting
it is a simple problem, but I am totally new to shell programming
There are 2 files. I have to print the 5 five lines which are different.
I appreciate any help.
10x. (2 Replies)
Discussion started by: atticus
2 Replies