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:
AXCVB,... (5 Replies)
Discussion started by: nani2019
2. Shell Programming and Scripting
I need to find files in a specified folder where are two specified lines of text and delate that lines. It looks like this"
36. <iframe>.......</iframe>NLThe problem is that "?>" is in the other lines and id should not be removed if the next line is not like "<iframe>....."
So... (4 Replies)
Discussion started by: androwida
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
4. Shell Programming and Scripting
I have two files, a keepout.txt and a database.csv. They're unsorted, but could be sorted.
notheruser27,4344,"hiya",thing,more thing,423... (4 Replies)
Discussion started by: esoffron
5. UNIX for Advanced & Expert Users
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
... (1 Reply)
Discussion started by: slashdotweenie
6. Shell Programming and Scripting
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)
Discussion started by: ink_LE
7. Shell Programming and Scripting
I have a group of text files with many lines in each file.
I need to delete all the lines in each and only leave 2 lines in each file. (3 Replies)
Discussion started by: script_op2a
8. Shell Programming and Scripting
I have two files and need to compare the two files and to remove the matching lines from both the files (4 Replies)
Discussion started by: shellscripter
9. Shell Programming and Scripting
I am trying to replace a few lines with other lines of all files in a directory which contain those few lines.
say - there are some 10 files in a dir having the same 4 lines as 1.txt at the starting
....................................... (1 Reply)
Discussion started by: rooster005
10. Shell Programming and Scripting
I want to delete first five and last five lines in text files without opening the file and also i want to keep the same file name for all the files.
Thanks in advance!!!
Ragav (10 Replies)
Discussion started by: ragavendran31