08-21-2013
I am new to Unix.
Can we use this command?
head -1 database.dat | wc
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I would really like to have a script that will accept the key press from the user with out having to press the enter key afterwards.
i.e.
echo "Press Y to print \c"
read YesNo
At this point the user has to press the enter key to continue. Is there a way to accept the key press from the... (3 Replies)
Discussion started by: jagannatha
3 Replies
2. UNIX for Dummies Questions & Answers
Hello,
I have a file where I am supposed to convert all the single i characters to uppercase, but when I try, it converts all the i's inside of words to uppercase as well.
I tried doing:
cat filename | sed 's/i/I/g'
but that obviously does not work.
Any help would be greatly... (6 Replies)
Discussion started by: zlindner
6 Replies
3. Shell Programming and Scripting
Hi all,
I have what I would have thought was a very simple problem but I can' find an elegant solution.
I have a file which has a single value you in it, say 194. All I want my perl script to do is open the file, read the value and assign that value to a variable.
I've done stuff like... (1 Reply)
Discussion started by: Donkey25
1 Replies
4. Shell Programming and Scripting
Hello,
I need to replace the comma to something else between the single quote:
1aaa,bbb,'cc,cc','ddd',1
2aaa,bbb,'ccc','d,d',0
to
1aaa,bbb,'cc<comma>cc','ddd',1
2aaa,bbb,'ccc','d<comma>d',0
Can someone help? Thanks. (2 Replies)
Discussion started by: bgirl
2 Replies
5. Shell Programming and Scripting
Hi,
I'm sorry if this has already been posted somewhere but I can't seem to find it on the forums (or anywhere on google :( )
I am writing a script where a user must enter a single character to perform an action.
For example, Press Q to Quit or R to Refresh
Basically I am stuggling... (5 Replies)
Discussion started by: Ste_Moore01
5 Replies
6. Shell Programming and Scripting
This reads single keystrokes and produces an output:
#! /bin/bash
while : ; do
read -s -n 1 >/dev/null 2>&1
echo ${REPLY}
done | awk '{print}'
This second one don't. Even though these examples make no sense; the real code is more complicated. Who knows what the problem is... (2 Replies)
Discussion started by: elbrand
2 Replies
7. Shell Programming and Scripting
Hi Guys,
Happy New Year to you all!
I have a requirement to read an embedded new-line using KSH's read builtin.
Here is what I am trying to do:
run_sql "select guestid, address, email from guest" | while read id addr email
do
## Biz logic goes here
done
I can take care of any... (6 Replies)
Discussion started by: a_programmer
6 Replies
8. Shell Programming and Scripting
How to remove characters enclosed in single quotes?
My data is something like this
(03/22/2011 08:17:26.650) : ( -> '1' -> '1-1-3' -> '6' -> '1' -> 'SALMOR58BB4' aaaaa bbbbbb ccccc ((dddd))
I want the output to be
(03/22/2011 08:17:26.650) : ( -> -> -> -> -> aaaaa... (2 Replies)
Discussion started by: rdhanek
2 Replies
9. Shell Programming and Scripting
Hi,
I have file in which fields are pipe (|) separated and the record separator is new line (\n). But sometime I am getting a field value which is spread across multiple line. Basically I am getting a file from another system in the below format and needs to process the file and load data into a... (3 Replies)
Discussion started by: satyaatcgi
3 Replies
10. Shell Programming and Scripting
Hi all.
I’ve 2 inputs here and would like to produce it in single ouput. I’ve drafted simple shell script but not sure how to put all this together. The final output should be “GROUP-XYZ” instead of “TEST”
Please advise.
INPUT1
GROUP-XYZ
INPUT2
type8code0@box:~/dbedit$ cat... (8 Replies)
Discussion started by: type8code0
8 Replies
LEARN ABOUT DEBIAN
arpsnmp
ARPSNMP(8) System Manager's Manual ARPSNMP(8)
NAME
arpsnmp - keep track of ethernet/ip address pairings
SYNOPSIS
arpsnmp [ -d ]
[ -f datafile ]
[ -s sendmail_path ]
[ -m addr ]
file [ ... ]
DESCRIPTION
Arpsnmp keeps track for ethernet/ip address pairings. It syslogs activity and reports certain changes via email. Arpsnmp reads information
from a file (usually generated by snmpwalk(8)).
The -d flag is used enable debugging. This also inhibits mailing the reports. Instead, they are sent to stderr.
The -f flag is used to set the ethernet/ip address database filename. The default is arp.dat.
(Debian) The -s flag is used to specify the path to the sendmail program. Any program that takes the option -odi and then text from stdin
can be substituted. This is useful for redirecting reports to log files instead of mail.
(Debian) The -m option is used to specify the e-mail address to which reports will be sent. By default, reports are sent to root on the
local machine.
Note that an empty arp.dat file must be created before the first time you run arpsnmp.
REPORT MESSAGES
(See the arpwatch(1) man page for details on the report messages generated by arpsnmp(1).)
FILES
/var/lib/arpwatch - default directory
arp.dat - ethernet/ip address database
/usr/share/arpwatch/ethercodes.dat - vendor ethernet block list
SEE ALSO
arpwatch(8), snmpwalk(8), arp(8)
AUTHORS
Craig Leres of the Lawrence Berkeley National Laboratory Network Research Group, University of California, Berkeley, CA.
The current version is available via anonymous ftp:
ftp://ftp.ee.lbl.gov/arpwatch.tar.gz
BUGS
Please send bug reports to arpwatch@ee.lbl.gov.
Attempts are made to suppress DECnet flip flops but they aren't always successful.
4th Berkeley Distribution 17 September 2000 ARPSNMP(8)