I have an awk statement that works but I am calling awk twice and I know there has to be a way to combine the two statements into one. The purpose is to pull out just the ip address from loopback1.
Sample config:
Hi, I need to change military time to regular time. I know to use case to indicate whether a.m. or p.m. as follows:
case "$hour"
in
0? | 1 ) echo a.m.;;
1 ) echo p.m.;;
* ) echo p.m.;;
esac
My question is how do I add the hour and minute... (2 Replies)
Hi
I am wondering is it possible to combine two greps together
I have two greps.
grep "^,, *\." file
(grep the line which has a '.' in the third column)
grep "=" file
(grep the line which has = anywhere)
How to put them together so that if the content of the file that match either... (1 Reply)
Greetings!
I have been tasked to create a report off files we receive from our hardware suppliers. I need to grep these files for two fields 'Test_Version' and 'Model-Manufacturer' ; for each field, I need to capture their corresponding values.
When running each statement separately, I get... (4 Replies)
below is something i inherited:
if && && ; then
HOST_SELECT="-m quadcore"
fi
if && && ; then
HOST_SELECT="-m quadcore"
fi
if && && ; then
HOST_SELECT="-m octocore1"
fibelow is what i changed it to:
if && && ; then
HOST_SELECT="-m quadcore"... (2 Replies)
Hi,
I have the following two awk statements which I'd like to consolidate into one by piping the output from the first into the second awk statement (rather than having to write kat.txt out to a file and then reading back in).
awk 'BEGIN {FS=OFS=" "} {printf("%s ", $2);for (x=7; x<=10;... (3 Replies)
i have a datafile that has several lines that look like this:
2,dataflow,Sun Mar 17 16:50:01 2013,1363539001,2990,excelsheet,660,mortar,660,4
using the following command:
awk -F, '{$3=strftime("%a %b %d %T %Y,%s",$3)}1' OFS=, $DATAFILE | egrep -v "\-OLDISSUES," | ${AWK} "/${MONTH} ${DAY}... (7 Replies)
Hello again everyone,
yes, I'm back again for more help! So I'm attempting to read two separate files and generate some XML code from that. My current code is:
BEGIN {
print "<?xml version=\"1.0\" encoding=\"utf-8\">"
print "<Export>"
}
{
x=1;
print "<section name=\"Query" NR "\">"... (5 Replies)
Hello fellow awkers,
I am trying to combine the following awk statements into 1 so that the results are more accurate:
awk '/\=\+/ { count++ } END { print count}' filename
awk '/\=\?/ { count++ } END { print count}' filename
awk '/\=\-/ { count++ } END { print count}' filename
awk... (8 Replies)
Hi
What is the right structure to use awk with multiple If statements
The following code doesn't work
#
awk '
{
A = $1
}
END {
for ( i = 1; i <= c; i++ )
{
if ( A == 236 && A ==199... (7 Replies)
I have a file like
file.
file.TODAY.THISYEAR
file.TODAY.LASTYEARI want to substitute the words in caps with their actual values so that output should look like
file.140805
file.140805.2014
file.140805.2013For this I am reading the file line bye line in an array and using multiple map... (1 Reply)
Discussion started by: sam05121988
1 Replies
LEARN ABOUT DEBIAN
lo
LO(4) BSD Kernel Interfaces Manual LO(4)NAME
lo -- software loopback network interface
SYNOPSIS
device loop
DESCRIPTION
The loop interface is a software loopback mechanism which may be used for performance analysis, software testing, and/or local communication.
As with other network interfaces, the loopback interface must have network addresses assigned for each address family with which it is to be
used. These addresses may be set or changed with the SIOCSIFADDR ioctl(2). The loopback interface should be the last interface configured,
as protocols may use the order of configuration as an indication of priority. The loopback should never be configured first unless no hard-
ware interfaces exist.
If the transmit checksum offload capability flag is enabled on a loopback interface, checksums will not be generated by IP, UDP, or TCP for
packets sent on the interface.
If the receive checksum offload capability flag is enabled on a loopback interface, checksums will not be validated by IP, UDP, or TCP for
packets received on the interface.
By default, both receive and transmit checksum flags will be enabled, in order to avoid the overhead of checksumming for local communication
where data corruption is unlikely. If transmit checksum generation is disabled, then validation should also be disabled in order to avoid
packets being dropped due to invalid checksums.
DIAGNOSTICS
lo%d: can't handle af%d. The interface was handed a message with addresses formatted in an unsuitable address family; the packet was
dropped.
SEE ALSO inet(4), intro(4)HISTORY
The lo device appeared in 4.2BSD. The current checksum generation and validation avoidance policy appeared in FreeBSD 8.0.
BSD March 15, 2009 BSD