Hello friends,
I have a problem in printing an array..
Example if my array line contains 4 elements like following
line=0002 , line=202200, line=200002, line= 300313
Now one = sprintf line line line line will concatenate my whole array to one.
But I am not sure about the... (7 Replies)
Hello,
I'm trying to figure out how to use sed or awk to delete single lines in a file. By single, I mean lines that are not touching any other lines (just one line with white space above and below).
Example:
one
two
three
four
five
six
seven
eight
I want it to look like: (6 Replies)
Hi friends,
This is sed & awk type question.
I have a text file which has numbers spread all over the file. I want to sum the series of numbers whenever i find it and produce an output file with the sum. For example
###start of input text file ####
abc
def
ghi
1
2
3
4
kjld
random... (3 Replies)
Hello,
I have a table as shown below. I want to concatenate values in col2 and col3 based on a value in col4.
1 X Y A
3 Y Z B
4 A W B
5 T W A
If col4 is A, then I want to concatenate col3 with itself. Otherwise it should concateneate col2 with col3.
1 X Y YY
3 Y Z YZ... (10 Replies)
Hello
I want to achieve the following.
However the concatenation is not working
mv `ls -ltr *myfile*.log|awk '{print $9}'` `ls -ltr *myfile*.log|awk '{print `date +'%d%m%y%k%M%S'` $9}'`
I tried
awk '{x=`date +'%d%m%y%k%M%S'` print $x "" $9}'
awk '{x=`date +'%d%m%y%k%M%S'`... (2 Replies)
URGENT HELP IS NEEDED!!
I am looking to move matching lines (01 - 07) from File1 and 77 tab the matching string from File2, to File3.txt. I am almost done but
- Currently, script is not printing lines to File3.txt in order.
- Also the matching lines are not moving out of File1.txt
... (1 Reply)
Hi,
I have a file containing many records delimited by pipe (|).
Each record should contain 17 columnns/fields. there are some fields having fields less than 17.So i am extracting those records to a file using the below command
awk 'BEGIN {FS="|"} NF !=17 {print}' feedfile.txt... (8 Replies)
Hello all,
I have a large csv file where there are four types of rows I need to merge into one row per person, where there is a column for each possible code / type of row, even if that code/row isn't there for that person.
In the csv, a person may be listed from one to four times... (9 Replies)
Greetings Experts,
I have an excel file and I am unable to read it directly into awk (contains , " etc); So, I cleansed and copied the data into notepad.
I need to generate a script that generates the SQL.
Requirement:
1. Filter and select only the data that has the "mapping" as "direct"... (4 Replies)
Hello All,
This is to request some assistance on the issue that I encountered until recently.
Problem is:
I have a pipe delimited file in which some lines/records are broken. Now, I have to join/concatenate broken lines in the file to form actual record to make sure that the count of records... (8 Replies)
Discussion started by: svks1985
8 Replies
LEARN ABOUT DEBIAN
ifdata
ifdata(1)ifdata(1)NAME
ifdata - get network interface info without parsing ifconfig output
SYNOPSIS
ifdata [options] {iface}
DESCRIPTION
ifdata can be used to check for the existence of a network interface, or to get information abut the interface, such as its IP address. Un-
like ifconfig or ip, ifdata has simple to parse output that is designed to be easily used by a shell script.
OPTIONS -h Print out a help summary.
-e Test to see if the interface exists, exit nonzero if it does not.
-p Prints out the whole configuration of the interface.
-pe Prints "yes" or "no" if the interface exists or not.
-pa Prints the IPv4 address of the interface.
-pn Prints the netmask of the interface.
-pN Prints the network address of the interface.
-pb Prints the broadcast address of the interface.
-pm Prints the MTU of the interface.
Following options are Linux only.
-ph Prints the hardware address of the interface.
-pf Prints the flags of the interface.
-si Prints out all the input statistics of the interface.
-sip Prints the number of input packets.
-sib Prints the number of input bytes.
-sie Prints the number of input errors.
-sid Prints the number of dropped input packets.
-sif Prints the number of input fifo overruns.
-sic Print the number of compressed input packets.
-sim Prints the number of input multicast packets.
-so Prints out all the output statistics of the interface.
-sop Prints the number of output packets.
-sob Prints the number of output bytes.
-soe Prints the number of output errors.
-sod Prints the number of dropped output packets.
-sof Prints the number of output fifo overruns.
-sox Print the number of output collisions.
-soc Prints the number of output carrier losses.
-som Prints the number of output multicast packets.
-bips Prints the number of bytes of incoming traffic measured in one second.
-bops Prints the number of bytes of outgoing traffic measured in one second.
AUTHOR
Benjamin BAYART
2006-03-07 ifdata(1)