There are many ways of doing what you want. Here is an example of one way
Thank you for the answer, fpmurphy.
Could i know the other ways, please ? since i am avoiding writing the result into a file.
Then, what does "cut -d "" -f 5" mean ?
Hi,
how can i print the previous, current and next line using sed?
current line is the matching line.
The following prints all lines containing 'Failure' and also the immediate next line
cat $file | sed -n -e '/Failure/{N;p;}'
Now, i also want to print the previous line too.
Thanks,... (8 Replies)
Hi,
I am new to ksh scripting and I have a problem.
I have a file in which I have to search for a particular pattern say 'a' then from that line I need to search for another pattern say 'b' in the previous lines and thne print the file from pattern 'b' till the end of file.
For eg:
... (2 Replies)
HELLO...I wanted to ask you, than sure know unix more than me, as I can obtain the following solution: I have a file with rows of the type:
CIAO COME STAI
PERCHE COME STAI
CIAO COME VA
ALLO CHE FACCIAMO
.................
I would that if in a line is present the word (for example) " CHE... (9 Replies)
My requirement is that when ever search criteria matchs in log file, the previous line just above the search word as well as search word should be print.
sample log file
--03-19T11:26 xxx create version "a.sh@@/main/6"
"104157 "
--03-18T16:01 xxx create version "a.sh@@/main/5"
... (6 Replies)
Hi guys,
I have found your forum super useful. However, right now I am stuck on a seemingly "simple" thing in AWK. I have two columns of data, the first column in Age (in million years) and the second column is Convergence Rate (in mm/yr).
I am trying to process my data so I can use it to... (2 Replies)
plz help me!!
I have this file ,
3408 5600
3796 6035
4200 6285
4676 0
40 1554
200 1998
652 2451
864 2728
1200 0
I want it like if $2==0,replace it with field from the previous line+500
say here the o/p would be like
3408 5600
3796 6035
4200 6285... (16 Replies)
Hello,
I know that gnu grep has option of -A and -B to extra previous and next lines.
But I'm using HP UX and its grep does not support these options.
BID="0/0/6/1/1.145.17.255.0.0.0"
I need to search a file using $BID and get next 5 lines and previous 5 lines separately.
Please... (1 Reply)
hi all,
I use
date +%Y
which gives Current year.
Requirement: I want previous year to be printed. Please help me.
Note: I tried
date +%d/%m/%Y -d "-1 years" which is not working. (10 Replies)
Please help me
print nth line after match
awk or sed one line command. (3 Replies)
Discussion started by: sushma123
3 Replies
LEARN ABOUT NETBSD
wakeonlan
WAKEONLAN(8) BSD System Manager's Manual WAKEONLAN(8)NAME
wakeonlan -- send Wake on LAN frames to hosts on a local Ethernet network
SYNOPSIS
wakeonlan [interface] lladdr [lladdr ...]
DESCRIPTION
The wakeonlan program is used to send Wake on LAN (WoL) frames over a local Ethernet network to one or more hosts using their link layer
(hardware) addresses. WoL functionality is generally enabled in a machine's BIOS and can be used to power on machines from a remote system
without having physical access to them.
interface is an Ethernet interface of the local machine and is used to send the Wake on LAN frames over it. If there is only one Ethernet
device available that is up and running, then the interface argument can be omitted. lladdr is the link layer address of the remote machine.
This can be specified as the actual hardware address (six hexadecimal numbers separated by colons) or as a hostname entry in /etc/ethers.
wakeonlan accepts multiple lladdr addresses. Link layer addresses can be determined and set using ifconfig(8).
FILES
/etc/ethers Ethernet host name data base.
SEE ALSO ethers(5), ifconfig(8)AUTHORS
wakeonlan was written by Marc Balmer <marc@msys.ch>.
BSD May 25, 2012 BSD