Sponsored Content
Full Discussion: Simple grep Question
Top Forums Shell Programming and Scripting Simple grep Question Post 302261430 by elbombillo on Monday 24th of November 2008 04:04:56 PM
Old 11-24-2008
Thanks, looks like it works. Can you explain how this works? I just like to understand it and use it in the future. Also does this work if need to run a command and grab all the output from it....for example running the command /usr/sbin/networksetup -listallnetworkservices on a leopard machine I get all the network services. How would I use this command to only print anyone that contains with "Ethernet".

Since I'm used to using grep I run /usr/sbin/network -listallnetworkservices |grep Ethernet, but I get 3 responses and I need to select each on individually. Can you help?

Thanks again.

Last edited by elbombillo; 11-24-2008 at 05:23 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Simple grep questions

Hi all, My boss wants me to find out how often e-m users are accessing their account:confused:. The mail server keeps log of all logins. I want to use grep the 'usernames', but it should come out the moment it first encounters the username in the log. Can I do that? I want to avoid 10+ greps... (2 Replies)
Discussion started by: nitin
2 Replies

2. UNIX for Dummies Questions & Answers

simple grep question

I have seen this used several times but not really sure of what it actually does. I am confused with the second grep as the argument to the first. some commands | grep -v grep | some other commands Can anyone provide an explanation? Thanks, (5 Replies)
Discussion started by: google
5 Replies

3. Shell Programming and Scripting

Simple grep question, but I'm out of practice

Never mind, I did more research, and now am using grep -v './temp/', dumping it into a new text file, then using mv -f to make that the original file. Thanks for reading! --------------- Hi folks, I haven't done any scripting in years, and now I have a problem. Our backup tapes are filling... (0 Replies)
Discussion started by: citygov
0 Replies

4. UNIX for Dummies Questions & Answers

Ok simple question for simple knowledge...

Ok what is BSD exactly? I know its a type of open source but what is it exactly? (1 Reply)
Discussion started by: Corrail
1 Replies

5. Programming

Simple C question... Hopefully it's simple

Hello. I'm a complete newbie to C programming. I have a C program that wasn't written by me where I need to write some wrappers around it to automate and make it easier for a client to use. The problem is that the program accepts standard input to control the program... I'm hoping to find a simple... (6 Replies)
Discussion started by: Xeed
6 Replies

6. UNIX for Dummies Questions & Answers

Simple newbie grep question

How come grep testfile1 won't find anything in testfile1 (even though the characters sd are there in great quantity), but grep '' testfile1 will find plenty? Do the single quotes prevent the shell from interpreting the testfile1 is interpreted as: grep *test whether or not characters sd exist*... (5 Replies)
Discussion started by: doubleminus
5 Replies

7. UNIX for Dummies Questions & Answers

Simple grep question

This should be so easy... I want to find all the apps in /Applications that start with the lower case i (e.g. iTunes.app, iSync.app, iCal.app) They should all have the .app extension. I've tried: ls /Applications |grep -o i*.app ls /Applications/i*.app Anyhow, I just want to see what apps... (2 Replies)
Discussion started by: glev2005
2 Replies

8. Shell Programming and Scripting

Simple grep script

I'm trying to write a simple script to identify every user who tried to “sudo” on the system. I have the first portion down to grep the log file grep “sudo” /var/log/secure. What I want to do is have the script identify the person just one time not every instance the user tried... (4 Replies)
Discussion started by: bouncer
4 Replies

9. UNIX for Dummies Questions & Answers

Simple grep question

I hope someone can help me. I have a folder e.g. /opt/application Under that are many sub folders e.g. Folder1 Folder2 Folder3 Folder4 Folder5 Folder6 etc In some of these fodlers (not all of them) is a file called errors.log I need to run a grep that will start at... (3 Replies)
Discussion started by: gunnahafta
3 Replies

10. Red Hat

Syslog.conf: looking for a simple answer on a simple question

Cheers! In /etc/syslog.conf, if an error type is not specified, is it logged anywhere (most preferable is it logged to /var/log/messages) or not? To be more precise I am interested in error and critical level messages. At default these errors are not specified in syslog.conf, and I need to... (6 Replies)
Discussion started by: dr1zzt3r
6 Replies
in.rarpd(1M)						  System Administration Commands					      in.rarpd(1M)

NAME
in.rarpd, rarpd - DARPA Reverse Address Resolution Protocol server SYNOPSIS
/usr/sbin/in.rarpd [-d] -a /usr/sbin/in.rarpd [-d] device unit DESCRIPTION
in.rarpd starts a daemon that responds to Reverse Address Resolution Protocol (RARP) requests. The daemon forks a copy of itself that runs in background. It must be run as root. RARP is used by machines at boot time to discover their Internet Protocol (IP) address. The booting machine provides its Ethernet address in a RARP request message. Using the ethers and hosts databases, in.rarpd maps this Ethernet address into the corresponding IP address which it returns to the booting machine in an RARP reply message. The booting machine must be listed in both databases for in.rarpd to locate its IP address. in.rarpd issues no reply when it fails to locate an IP address. in.rarpd uses the STREAMS-based Data Link Provider Interface (DLPI) message set to communicate directly with the datalink device driver. OPTIONS
The following options are supported: -a Get the list of available network interfaces from IP using the SIOCGIFADDR ioctl and start a RARP daemon process on each interface returned. -d Print assorted debugging messages while executing. EXAMPLES
Example 1 Starting An in.rarpd Daemon For Each Network Interface Name Returned From /dev/ip: The following command starts an in.rarpd for each network interface name returned from /dev/ip: example# /usr/sbin/in.rarpd -a Example 2 Starting An in.rarpd Daemon On The Device /dev/le With The Device Instance Number 0 The following command starts one in.rarpd on the device /dev/le with the device instance number 0. example# /usr/sbin/in.rarpd le 0 FILES
/etc/ethers File or other source, as specified by nsswitch.conf(4). /etc/hosts File or other source, as specified by nsswitch.conf(4). /tftpboot /dev/ip /dev/arp ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWbsu | +-----------------------------+-----------------------------+ SEE ALSO
svcs(1), boot(1M), ifconfig(1M), svcadm(1M), ethers(4), hosts(4), netconfig(4), nsswitch.conf(4),attributes(5), smf(5), dlpi(7P) Finlayson, R., Mann, T., Mogul, J., and Theimer, M., RFC 903, A Reverse Address Resolution Protocol, Network Information Center, SRI Inter- national, June 1984. NOTES
The in.rarpd service is managed by the service management facility, smf(5), under the service identifier: svc:/network/rarp Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using svcadm(1M). The ser- vice's status can be queried using the svcs(1) command. SunOS 5.11 20 Aug 2004 in.rarpd(1M)
All times are GMT -4. The time now is 05:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy