Need to remove lines that start with an IP address
Hi,
I keep having to remove lines have an IP address as the second field from my awstats logs, as it makes the processing fail.
Rather than do it individually each time (once or twice a week) it fails, I'd like to remove any lines from the file that have 3 digits and then a dot as the start of the second field as they are sure to be an IP.
The field separators are spaces
I know if the line starts with an IP I can easily do it with grep like so:
But this is the second field so I imagine I have to use awk, right?
hi,
i "accidentedly" added some logical ip address to my solaris 8 machine.
now i want to remove them. i already man ifconfig but some how i just keep getting the wrong syntax.
this is the command i used to add
ifconfig hme0 addif 192.168.100.10 netmask 255.255.2550.0 up
so, now... (2 Replies)
Is it possible to remove empty lines between >humid-sets (bold) and also humidset that start with -- (for ex: > humid3 | () : | (+) )
Thanx in advance
Note: The humid sets will be in thousands and lines will be more than 100 thousand.
input
> humid1 | () : | (+)... (7 Replies)
Hi,
I have a directory with the following file names
01 - abc hyn
02-def
03-ghi.dir
04 - jhu.dir
abc1 kil
def bil
The last two file names abc1 starts with one space and def starts with double space. I want these files in my directory to be renamed as
ABC HYN
DEF
GHI.dir... (6 Replies)
Hi,
I am trying to remove lines once a string is found till another string is found including the start string and end string. I want to basically grab all the lines starting with color (closing bracket). PS: The line after the closing bracket for color could be anything (currently 'more').... (1 Reply)
Hi, I have multiple large files which consist of the below format:
I am trying to write an awk or sed script to remove all occurrences of the 00 record except the first and remove all of the 80 records except the last one.
Any help would be greatly appreciated. (10 Replies)
Oracle Linux 6.4/Bash
I have a file like below. I want to remove all lines which start with # character. Can I do this vi editor ? If not , which other utility can I use for this ?
# This is a test script
CUSER=`id |cut -d"(" -f2 | cut -d ")" -f1`
# Some text
CDATE=`date +%y%m%d` ## get... (3 Replies)
I need to replace the (*) in the fist of a list with numbers using sed for example >
this file contain a list
* linux
* computers
* labs
* questions
to >>>>
this file contain a list
1. linux
2. computers
3. labs
4. questions (7 Replies)
I have been searching and trying to come up with an awk that will perform the following on a
converted text file (original is a pdf).
1. Since the first two lines are (begin with) text they are removed
2. if $1 is a number then all text is merged (combined) into one line until the next... (3 Replies)
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
LEARN ABOUT DEBIAN
deb-origin
deb-origin(5) Debian deb-origin(5)NAME
deb-origin - Vendor-specific information files
SYNOPSIS
/etc/dpkg/origins/filename
DESCRIPTION
The files in /etc/dpkg/origins can provide information about various vendors who are providing Debian packages. They contain a number of
fields, or comments when the line starts with '#'. Each field begins with a tag, such as Vendor or Parent, followed by a colon and the
body of the field. Fields are delimited only by field tags. In other words, field text may be multiple lines in length, but the tools will
join lines when processing the body of the field.
REQUIRED FIELDS
Vendor: vendor-name
The value of this field determines the vendor name.
OPTIONAL FIELDS
Vendor-URL: vendor-url
The value of this field determines the vendor URL.
Bugs: bug-url
The value of this field determines the type and address of the bug tracking system used by this vendor. It can be a mailto URL or a
debbugs URL (e.g., debbugs://bugs.debian.org/).
Parent: vendor-name
The value of this field determines the vendor name of the vendor that this vendor derives from.
EXAMPLE
Vendor: Debian
Vendor-URL: http://www.debian.org/
Bugs: debbugs://bugs.debian.org
SEE ALSO dpkg-vendor(1)Debian Project 2011-11-10 deb-origin(5)