Let's say I write a simple script that contains the following:
date | awk '{print $1}'
date | awk '{print $2}'
Of course, when I run the script the output will look similar to:
Tue
Mar
What if I want my ouput to be on one line as follows:
Tue Mar
What changes would I need to... (2 Replies)
Hi,
I need to insert a line at a particular line number. I am using the below code:
sed $REV_LINO_NO" i\\
# $CURRENT_DATE $NAME Changed pwd for cindy\'s id" file > file1
This code works, but the formatting is not as I expected. For example, I get lines as shown below... (2 Replies)
hi
I have a string pattern like
...
...
000446448742 00432265 040520100408 21974435 DEWSWATER GARRIER AAG IK4000 N 017500180000000000000000077000000000100
000446448742 00580937 040520100408 32083576 PEWSWATER BARRIER DAG GK4000 ... (6 Replies)
Dear all
I require help with AWK regarding this situation
Input is :
fn1 12345
fn1 23456
fn3 231513
fn1 22325
fn3 123125
Desired output is
fn1 12345 23456 22325
fn3 231513 123125 (5 Replies)
when i try this awk its giving out put as below.
awk '!(/^$/||/--/||/selected/||/^ *$/){print $1}' tmp.txt
output
=====
1
2010-08-03-12.31.26.126000
how excluede the 1st line ? i mean i want output only 2nd line i.e 2010-08-03-12.31.26.126000; (5 Replies)
Hi all,
I'm writing a simple awk code:
awk 'BEGIN {FS="|"};{print "Type\tNumber\ttypes\tTotal";};{print $1, "\t", $2, "\t", $3, "\t", $4, "\t";}' db_query.txt
it gives me the result:
Type Number types Total
XXX 498.0 5100.0 5274.661
Type Number types Total... (7 Replies)
trying to write up a script to put the suffix back.
heres what I have but can't get it to do anything :(
would like it to be name.date.suffix
rsync -zrlpoDtub --suffix=".`date +%Y%m%d%k%M%S`.~" --bwlimit=1024 /mymounts/test1/ /mymounts/test2/
while IFS=. read -r -u 9 -d '' name... (1 Reply)
Hi all,
Is it possible to tell awk that the first line of text is a header and then print dashes after it is printed before it prints the rest of the text?
Note example below:
Source file:
Filesystem kbytes used avail capacity Mounted on
server-p01:/vol/vol_vol01/db01... (3 Replies)
Please help me to get required output for both scenario 1 and scenario 2 and need separate code for both scenario 1 and scenario 2
Scenario 1
i need to do below changes only when column1 is CR and column3 has duplicates rows/values. This inputfile can contain 100 of this duplicated rows of... (1 Reply)
Discussion started by: as7951
1 Replies
LEARN ABOUT DEBIAN
mcsender
MCSENDER(8) System Manager's Manual MCSENDER(8)NAME
mcsender - Multicast test tool to send multicast test packets
SYNOPSIS
mcsender [-t<ttl>] [-i<interface>] ip:port
DESCRIPTION
mcsender sends multicast packets to the specified IPv4 or IPv6 multicast address and port. The packets sent contain the string "this is the
test message from mclab/mcsender
".
OPTIONS
-t<ttl>
Set the TTL (or hop limit for IPv6) to the specified value.
-i<interface>
Specify the interface to use for outgoing multicast datagrams.
EXAMPLES
To send datagrams to IPv4 multicast address 239.1.1.1 and port 12345 with a TTL of 3:
$ mcsender -t3 239.1.1.1:12345
To send datagrams to IPv4 multicast address 239.1.1.1 and port 12345 with a TTL of 3 out of interface eth1:
$ mcsender -ieth1 -t3 239.1.1.1:12345
To send datagrams to IPv6 multicast address ff15::1 and port 12345 with a hop limit of 3:
$ mcsender -t3 ff15::1:12345
To send datagrams to IPv6 multicast address ff15::1 and port 12345 with a hop limit of 3 out of interface eth1:
$ mcsender -ieth1 -t3 ff15::1:12345
AUTHOR
mcsender was written by Carsten Schill <carsten@cschill.de>.
Support for IPv6 was added by Todd Hayton <todd.hayton@gmail.com>.
This manual page was written by Julien BLACHE <jblache@debian.org>, for the Debian project (but may be used by others).
August 08, 2011 MCSENDER(8)