10 More Discussions You Might Find Interesting
1. Linux
When unlocking a Linux server's console there's no event indicating successful logging
Is there a way I can fix this ?
I have the following in my rsyslog.conf
auth.info /var/log/secure
authpriv.info /var/log/secure (1 Reply)
Discussion started by: walterthered
1 Replies
2. Shell Programming and Scripting
I have input file like
AAA
AAA
CCC
CCC
CCC
EEE
EEE
EEE
EEE
FFF
FFF
GGG
GGG
i was trying to retrieve data between two strings using sed.
sed -n /CCC/,/FFF/p input_file
Am getting output like
CCC
CCC
CCC (1 Reply)
Discussion started by: NareshN
1 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
I am looking for a simple concise solution most likely using sed to process the following 4 rows of data from the same record and only keeps it if the second record satisfy certain critea such as surname matches up to smith or jackson:
John (firstname)
Smith (surname) ... (21 Replies)
Discussion started by: gjackson123
21 Replies
4. Shell Programming and Scripting
Hi guys, I am currently using this to save first 50 lines into top50.txt and delete them from list.txt ... it's 2 commands:
head -n 50 list.txt > top50.txt && sed -i "1,50 d" list.txt
I want to change that so it's 1 command - whereby sed removes the first 50 lines as above but that which is... (3 Replies)
Discussion started by: holyearth
3 Replies
5. Shell Programming and Scripting
Hi for all!
sorry guys for my dumb question, but I'm really need help
so,
we have file with many many fields, like this one:
201001002359 blablabla 87654321 201001002359 123,56 77272588300 blablabla/123 91823778544and I wrote awk command
awk '{if($6~/(2588300|2580000|2587021)$/)print}'so,... (8 Replies)
Discussion started by: shizik
8 Replies
6. Shell Programming and Scripting
Hi all,
First off, Thank you all for the knowledge I have gleaned from this site!
Deleting Records from a text file... sed paragraphs
The following code works nearly perfect, however each time it is run on the log file it adds a newline at the head of the file, run it 5 times, it'll have 5... (1 Reply)
Discussion started by: Festus Hagen
1 Replies
7. Shell Programming and Scripting
I need to generate exactly 102 duplicates in a file using sed.
Here's an example of my input:
Grid-ref = 1, 148
Grid-ref = 1, 311
Grid-ref = 1, 428
I need:
Grid-ref = 1, 148
Grid-ref = 1, 148
Grid-ref = 1, 148
Grid-ref = 1, 148
... repeated 102 times, then
Grid-ref = 1, 311... (2 Replies)
Discussion started by: Russ
2 Replies
8. Shell Programming and Scripting
Hi,
I am simply trying to remove the header row from a file using sed, but I'm running into strange difficulties.
It seems that in addition to removing the first line, this command is also removing the last line (or more specifically, clearing the last line, since the line is still counted... (4 Replies)
Discussion started by: erichpowell
4 Replies
9. Shell Programming and Scripting
Hi gurus, hoping someone can help with a sed line that can do the following...
I have a flat file with about 1000 records, but in order to import into openoffice spreadsheet, I need to create a delimited file. I'd like to do 2 things with the SED command:
1- add a pipe character "|" at the end... (4 Replies)
Discussion started by: RogCor
4 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I need to compare todays file to yesterdays file to find deletes.
I cannot use comm -23 file.old file.new.
Because each record may have a small change in it but is not really a delete.
I have two delimited files. the first field in each file is static. All other fields may change. I... (2 Replies)
Discussion started by: eja
2 Replies