- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: shell script
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2005 10:05 PM
тАО04-26-2005 10:05 PM
shell script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2005 10:19 PM
тАО04-26-2005 10:19 PM
Re: shell script
http://hpux.cs.utah.edu/
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2005 11:59 PM
тАО04-26-2005 11:59 PM
Re: shell script
If you accomplish on making general format of input lines, it is easy to use shell script.
If you have issues post yours with input and expected output. Lots of shell script lovers are here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2005 12:54 AM
тАО04-27-2005 12:54 AM
Re: shell script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2005 11:03 AM
тАО04-27-2005 11:03 AM
Re: shell script
file :url.txt (urls saved line-by-line)
now, the script should take each url(this will be with 1 thread 1) and look for the @ for example (emails) extract whats before and after @ till he find brakes, extract the xxx@XXX.xxx and deposit in a file out.txt lets say, in the end i'll have the data extracted. For phones address etc should be about the same..think this is the simplest way possible? maybe not the best.
thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2005 12:00 PM
тАО04-27-2005 12:00 PM
Re: shell script
In which case, I'd be suggesting either awk or perl for their pattern matching strengths.
But mainly, you need to learn what a regular expression is, and at the very least the basics of how they work.
On any unix/linux box shell, type 'man regex', and you should start getting some info about how they work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2005 04:48 PM
тАО04-27-2005 04:48 PM
Re: shell script
We can not attain by explaining in general words about requirement, It should be in technical flow to reach it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-08-2005 11:55 PM
тАО05-08-2005 11:55 PM
Re: shell script
Please post your file (or another example) and specify exactly what you want. There should be dozens of helpfull people eager to help you!
Cheerio,
Renarios
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-09-2005 12:13 AM
тАО05-09-2005 12:13 AM
Re: shell script
URL's and e-mails are very hard to parse if you want to follow the RFC's. Regexp::Common doesn't even support e-mails yet at the moment.
http://search.cpan.org/~abigail/Regexp-Common-2.120/
If you have URL's that you want to fetch
use LWP::Simple;
my $content = get "http://www.there.com/file.html";
So, if you have a file with e-mails, and you do not want to follow the RFC's very close, but just plainly and crudely parse mail adresses:
--8<---
#!/usr/bin/perl
use strict;
use warnings;
@ARGV = ("file.url");
while (<>) {
if (m/<(\S+?\@\S+?)>/) {
print "$1\n";
next;
}
if (m/\b([-\w._]+\@[-\w._]+)\b/) {
print "$1\n";
next;
}
pritnSTDERR "no mail on this line\n";
-->8---
but remember that
"Jonder Bl'├в ┬ж├Г ├Д ├В┬к├Д┬ж"
is a VALID e-mail according to the RFC
Enjoy, Have FU
- Tags:
- Perl