Sponsored Content
Operating Systems HP-UX alternative for egrep -o on HP-UX Post 302396272 by vostro on Thursday 18th of February 2010 05:13:18 AM
Old 02-18-2010
alternative for egrep -o on HP-UX

Hello to all board members!!

I have a problem on a HP-UX system. I should write a script. Therefore I need to search after IP addresses in the output of a command.

On Debian this works:
Code:
 ifconfig | egrep -o "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}"

The script where i need this is not ifconfig, but the output has a lot of rubbish and some IP addresses. And I need the IP addresses.

Another problem is that there is no way to find the IP on another way.

Is there someting avaiable on HP-Ux to search something like xxx.xxx.xxx.xxx ?

I also don't want to install the GNU egrep.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Using awk (or an alternative)

Hi, I'm trying to echo a variable that has values separated by colons, putting each value on a new line. So as an example, a variable I might have would contain: My name is Earl:My name is Dorothy:My name is Bernard: And I want the output: My name is Earl My name is Dorothy My name... (5 Replies)
Discussion started by: michaeltravisuk
5 Replies

2. UNIX for Dummies Questions & Answers

Egrep cheat sheet anywhere? Looking for meaning of egrep -c

Hi I've been searching google and have not found what egrep -c means. Does anyone know where I can get a cheat sheet or what that -c means? thanks, Linda (2 Replies)
Discussion started by: leelm
2 Replies

3. Shell Programming and Scripting

help with while loop or any other alternative?

i=1 while do mm=02 dd=03 yy=2008 echo "$mm$dd$yy" i=$(( i+1)) echo "$i" done whenever i execute the script above i will get the error below: syntax error at line 30: `i=$' unexpected (3 Replies)
Discussion started by: filthymonk
3 Replies

4. Shell Programming and Scripting

du alternative in perl

I have a perl script that just does a `du -sk -x` and formats it to look groovy ( the argument can be a directory but usually is like /usr/local/* ) #!/usr/bin/perl use strict; use warnings; my $sizes = `du -x -sk @ARGV | sort -n`; my $total = 0; print "MegaBytes Name\n"; for(split... (1 Reply)
Discussion started by: insania
1 Replies

5. UNIX for Dummies Questions & Answers

search ")" with egrep - egrep: syntax error

Hi Guys, we have a shell script which basically query the Database which retrieves huge data and use the data with "egrep" . Now there is some data which contains characters like "abc)" and the same is used like below : "egrep (.+\|GDPRAB16\|GDPR/11702 96 abc)\|$ temp.txt" now while... (7 Replies)
Discussion started by: sagarjani
7 Replies

6. Shell Programming and Scripting

Alternative for wc -l

Hi techies .. This is my first posting hr .. Am facing a serious performance problem in counting the number of lines in the file. The input files i get will be in some 10 to 15 Gb of size or even sometimes more ..and I will load it to db I have used wc -l to confirm whether the loader... (14 Replies)
Discussion started by: rajesh_2383
14 Replies

7. Solaris

vi alternative

Is there any other editor, installed by 'default' in Sparc Solaris10, besides vi? I'd like to avoid installing anything new. If not, how to make vi more user-friendly? thanks. (8 Replies)
Discussion started by: orange47
8 Replies

8. Shell Programming and Scripting

Looking for an alternative to Tcl

I've created quite a collection of tcl scripts which have buttons, radio buttons, check boxes, text fields, etc. These tcl scripts in turn call and execute several hundred sh, csh, bash, perl scripts and pass in the args based on the gui selections on the same and other redhat machines. We're... (4 Replies)
Discussion started by: scottwevans
4 Replies

9. Shell Programming and Scripting

Please help -- any alternative to expect ?

Doing some automation to automate some server tasks in Linux through shell scripting. In the script I tried to call a expect script to log into another server and execute a command. Please note: passwordless SSH is not possible hence am trying some User-interactive commands like Expect to send... (2 Replies)
Discussion started by: alldbest
2 Replies

10. UNIX for Beginners Questions & Answers

Tips/advise on alternative to doing egrep -v

Hi all, At the moment, I am doing the following to exclude some exception strings. The more I need to exclude, the longer the string becomes and it has become error prone as I edit the list manually. $ cat output.txt host=192.168.1.99 user=mickey host=192.168.1.99 user=mickey... (4 Replies)
Discussion started by: newbie_01
4 Replies
ALSEARCH(1)						User Contributed Perl Documentation					       ALSEARCH(1)

NAME
alsearch - Search the AudioLink database for music SYNOPSIS
alsearch [OPTION]... search_option... --td=/some/path/to/create/links/ alsearch [OPTION]... search_option... -s DESCRIPTION
You can use this script to search for songs in the AudioLink database. You can specify one or several options for the artist, composer, lyricist, album, etc., as the search criteria. You can specify several search_option options to search for particular music files. See the section on "search options" for the list of options. The search is not case sensitive. alsearch looks for strings as well as sub-strings in the fields being searched. See the "examples" section for more information. Specifying the --td (target directory) option is mandatory for creating links to the actual files. This directory will contain the symbolic links to the actual audio files. The directory will be created if it doesn't exist. Creating symbolic links to the actual files is analogous to creating playlists in audio-playing software. Symbolic links are actually just point to the actual files on the hard disk. This way of creating and storing playlists is very useful in several ways, some of which are: 1. Compatible across various audio players Since the "playlists" are actually files represented on your hard disk, you can add whole directories generated by the alsearch program in the playlist of your audio software. If you switch to another music player for whatever reason, you still have your playlists. You don't have to bother about compatibility between the playlist formats of the two players. 2. Can be seen and operated upon in a file browser As the symbolic links are present on a file-system, your playlist collection can be viewed by using normal file operations in the shell or using a GUI-based file browsing program. If the file browsing program is supports file traversals and symlinks, it'll show you the information of the actual song. OPTIONS
--help Brief usage information --host=xxx Connects to the MySQL server on the target host. Default is localhost. --pass=xxx Password for the database -s, --na Just displays the search results, doesn't create links (simulation mode) --td=xxx Target-directory in which to create links --user=xxx Username for the database -v, --verbose Displays some extra information. Useful for spotting errors and sending debug information. SEARCH OPTIONS
--album=xxx Search in the "album" field --artist=xxx Search in the artist/band/performers fields. You can give this option multiple times, for example: "alsearch --artist=kishore --artist=asha --td=/songs/asha_kishore" --comment=xxx Search in the "comment" field -c, --composer=xxx Search in the "composer" field --genre=xxx Search in the "genre" field -l, --lyricist=xxx Search in the "lyricist" field --title=xxx Search in the "title" field EXAMPLES
The options that take arguments can be specified in two ways: "alsearch --artist="kishore kumar" --td=/songs/kishore" "alsearch --artist "kishore kumar" --td /songs/kishore" That is, the option and the argument can be separated with a ' ' (space) or an '=' (equal) sign. In case you want to search for a string that has spaces, enclose the string in " ". "alsearch --artist=kishore --composer=burman --lyricist=bakshi" Will search for songs sung by *Kishore*, composed by *Burman* and written by *Bakshi*. Any name in the composer field which have "burman" in them will be matched. This means, it'll find songs composed by RD Burman, SD Burman, etc. This is true for all search fields. SEE ALSO
L<audiolink(1)>, L<alfilldb(1)> The current version of this man page is available on the AudioLink website at <http://audiolink.sourceforge.net/>. BUGS
Report bugs related to the AudioLink software or the man pages to the audiolink-devel mailing list <audiolink-devel@lists.sourceforge.net>. AUTHOR
This manual page is written and maintained by Amit Shah <amitshah@gmx.net> COPYRIGHT
The AudioLink package is Copyright (C) 2003, Amit Shah <amitshah@gmx.net>. All the programs and the documentation that come as part of AudioLink are licensed by the GNU General Public License v2 (GPLv2). perl v5.14.2 2003-12-06 ALSEARCH(1)
All times are GMT -4. The time now is 09:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy