10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I am trying to create an iptables script with tail ,sed and awk.
1st Request: Search keyword "secret" in access.log file
2nd Request: Get first column matching lines (ip address)
3rd Request: Save it to a file
This is what I did so far:
grep.sh
#!/bin/bash
while true;
do
tail... (23 Replies)
Discussion started by: baris35
23 Replies
2. How to Post in the The UNIX and Linux Forums
Hi,
I want to do file format using awk script, for that i wan to use 'tail'. Here is the scenario. I will be having set of files in a directory. Those files i need to write to another directory with same file name, but while writing the file to out directory, i need to write the last line as... (3 Replies)
Discussion started by: Venkata Madhu
3 Replies
3. UNIX for Dummies Questions & Answers
Hello,
When I am trying to use tail +13 filename.csv it is throwing an error.
tail: cannot open `+13' for reading: No such file or directory and then prints last 10 lines of the file. (File is present on the path)
But when i try tail -13 filename.csv it runs perfectly.
Could I have... (5 Replies)
Discussion started by: AnkitSenghani
5 Replies
4. Shell Programming and Scripting
I have 250 files that have 16 columns each - all numbered as follows stat.1000, stat.1001, stat.1002, stat.1003....stat.1250.
I would like to join all 250 of them together tail by tail as follows. For example
stat.1000
a b c
d e f
stat.1001
g h i
j k l
So that my output... (2 Replies)
Discussion started by: kayak
2 Replies
5. Shell Programming and Scripting
Hi,
I had few scripts which were running fine on linux:
uname -a
Linux ######### 2.6.9-89.ELsmp #1 SMP Mon Apr 20 10:33:05 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
from some front end application. Recently there was a migration of this application on some other linux m/c:
uname -a... (4 Replies)
Discussion started by: dips_ag
4 Replies
6. Shell Programming and Scripting
Hi, I only have a very limited understanding and experience with writing code and I was hoping I could get some help.
I have a dataset of two columns (txt format, numbers in each row separated by a tab)
Eg.
1 5
2 5
3 6
4 7
5 6
6 6
7 ... (5 Replies)
Discussion started by: Emred_Skye
5 Replies
7. Shell Programming and Scripting
Hi Folks,
I have a log that contains data as shown below:
11:59:43,144 (1,850) Signal : ....
11:59:44,109 (1850) Bps : .....
I wish to remove "" from all lines and it is on the start of every line. I have achieved that successfully using the command:
tail -f imp.log | sed 's/\... (4 Replies)
Discussion started by: umairrahman
4 Replies
8. UNIX for Dummies Questions & Answers
Hi ,
I have Continuous updating log file. I want to continuously scan that file using "tail -f " and execute a shell command like "date" command when that particular keyword is detected .
I am using awk to acheive it but not suceeded so far. However when I use "cat" instead of tail -f this... (3 Replies)
Discussion started by: scott_tiger
3 Replies
9. Shell Programming and Scripting
Hello,
I am too daft to remember how to properly feed numbers that I've extracted with awk(1) to tail(1).
The actual question is probably a lot more simple than the context, but let me give you the context anyway:
I've just received some email that was sent with MS Outlook and arrived in... (8 Replies)
Discussion started by: ropers
8 Replies
10. Shell Programming and Scripting
I want to run tail -f to continuously monitor a log file, outputing a specific field to a second log file. I can get the first portion to work with the following command:
tail -f log | awk '{if ($1 == "Rough") print $5}'
also:
awk '{if ($1 == "Rough") print $5}' <(tail -f log)
The... (2 Replies)
Discussion started by: mfajer
2 Replies