10-12-2006
Try whether this helps
$ egrep "bootpc|ssh" fname;egrep -v "bootpc|ssh" fname | nawk -F":|-" '{ print $2}'
*:bootpc
*:ssh
42904
47380
Last edited by mahendramahendr; 10-12-2006 at 05:21 AM..
8 More Discussions You Might Find Interesting
1. Solaris
I've installed Solaris 10 (x86 8/07) on a Dell PowerEdge 2950. When I bring up the Solaris Management Console I get red stop sign looking icons on all areas (System Status, System Configuration, Services, Storage, and Devices and hardware) under This computer. Originally nothing was showing up... (1 Reply)
Discussion started by: kayroreality
1 Replies
2. Shell Programming and Scripting
Hi experts a have a very large file and I need to add two columns: the first one numbering the incidence of records and the another with the total count
The input file:
21 2341 A
21 2341 A
21 2341 A
21 2341 C
21 2341 C
21 2341 C
21 2341 C
21 4567 A
21 4567 A
21 4567 C
... (6 Replies)
Discussion started by: juelillo
6 Replies
3. Shell Programming and Scripting
I have a txt file as database. when i run my program what it does is it ask me for 3 name and stored in the file as
name1:name2:name3:1
when u enter 3 name it add those in file as above format and add 1 at the end. I what i want is if i enter same names again it changes that 1 to 2 and so... (3 Replies)
Discussion started by: Learnerabc
3 Replies
4. Shell Programming and Scripting
I would like to print the number of records of 2 files, and divide the two numbers
awk '{print NR}' file1 > output1
awk '{print NR}' file2 > output2
paste output1 output2 > output
awl '{print $1/$2}' output > output_2
is there a faster way? (8 Replies)
Discussion started by: programmerc
8 Replies
5. Shell Programming and Scripting
Hi Power User,
I'm trying to compute this kind of text file format:
file1:
jakarta 100 150
jakarta 170 210
beijing 220 250
beijing 260 280
beijing 290 320
new_york 330 350
new_york 370 420
tokyo 430 470
tokyo 480 ... (2 Replies)
Discussion started by: anjas
2 Replies
6. Shell Programming and Scripting
Input file:
ID_34 2E-69 2324
ID_1 0E0 3254
ID_1 0E0 5434
ID_5 0E0 436
ID_1 1E-14 2524
ID_1 5E-52 46437
ID_3 65E-20 45467
ID_1 0E0 6578
...
Desired output file:
ID_1 0E0 6578
ID_1 0E0 5434
ID_1 0E0 3254
ID_1 5E-52 46437
ID_1 1E-14 2524
ID_3 65E-20 45467 (5 Replies)
Discussion started by: cpp_beginner
5 Replies
7. Shell Programming and Scripting
Hi
I want to use awk to match where field 3 contains a number within string - then print the line and just the number as a new field.
The source file is pipe delimited and looks something like
1|net|ABC Letr1|1530|||
1|net|EXP_1040 ABC|1121|||
1|net|EXP_TG1224|1122|||
1|net|R_North|1123|||... (5 Replies)
Discussion started by: Mudshark
5 Replies
8. Shell Programming and Scripting
Hello,
I have compiled a perl script to extract email address from an email file and tried to send email as bash script but " signs are ommitted by the bash script. What am I doing wrong? I would appreciate if you could fix it.
#!/bin/bash
while read -r COL1
do
echo "mail -s "This is a... (3 Replies)
Discussion started by: baris35
3 Replies
BOOTPC(8) Debian GNU/Linux Manual BOOTPC(8)
NAME
bootpc - bootp client
SYNOPSIS
bootpc [--bootfile file] [--dev device] [--verbose] [--debug] [--server addr] [--hwaddr addr] [--returniffail] [--waitformore length]
[--in2host addr] [--serverbcast] [--help]
DESCRIPTION
This manual page documents briefly the bootpc command. This manual page was written for the Debian GNU/Linux distribution (but may be used
by others), because the original program does not have a manual page.
bootpc is a boot protocol client used to grab the machine's IP address, set up DNS nameservers and other useful information.
OPTIONS
--bootfile file
Tell the server to use file as the boot file.
--dev device
Use device to communicate with the server.
--verbose
Be verbose.
--debug
Produce debugging output.
--server addr
Use the IP address addr to communicate with the server.
--hwaddr addr
Use addr as our hardware address rather than what the operating system gives us.
--returniffail
Terminate the program if a failure occurs. By default bootpc will ask the user to press a key if the request did not succeed.
--waitformore length
Wait for more responses when one is received. bootpc will wait for at most length seconds. This is probably only useful for debug-
ging.
--in2host addr
Takes an address and returns useful bits of the name after lookup, this was a separate program, but it is more compact to have both
together.
--serverbcast
Tell the server to send back a broadcast reply. This is necessary on Linux 2.1 and 2.2.
--help Display the usage of bootpc.
AUTHOR
This manual page was written by Herbert Xu <herbert@debian.org>, for the Debian GNU/Linux system (but may be used by others).
BOOTPC
1999 March 21st BOOTPC(8)