<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: shell script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3532974#M701705</link>
    <description>Do you have to use files for data storage? You can use MySQL database. Very simple and much easier to handle the data. When you use plain text files, you should think what's gonna happen if several ppl will update the records, for example ...</description>
    <pubDate>Wed, 27 Apr 2005 07:54:59 GMT</pubDate>
    <dc:creator>Alex Lavrov.</dc:creator>
    <dc:date>2005-04-27T07:54:59Z</dc:date>
    <item>
      <title>shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3532971#M701702</link>
      <description>I'm working on a shell script...first of all i'm a teh n00b on linux and shell scrips. This should be a project i've tooked for school. Basicly this script should be a data extractor like those for windows (software that based on a file filled with urls - extract the data you want address, phone no emails etc.) but for linux (since will work a lot faster). looking for help desperate a point to start or something. Thank you</description>
      <pubDate>Wed, 27 Apr 2005 05:05:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3532971#M701702</guid>
      <dc:creator>nick majuras</dc:creator>
      <dc:date>2005-04-27T05:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3532972#M701703</link>
      <description>This may have been done already&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.cs.utah.edu/" target="_blank"&gt;http://hpux.cs.utah.edu/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Wed, 27 Apr 2005 05:19:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3532972#M701703</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-04-27T05:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3532973#M701704</link>
      <description>Linux shell scripting is being with utils like awk, sed, perl are used for pattern extraction.&lt;BR /&gt;If you accomplish on making general format of input lines, it is easy to use shell script.&lt;BR /&gt;&lt;BR /&gt;If you have issues post yours with input and expected output. Lots of shell script lovers are here.</description>
      <pubDate>Wed, 27 Apr 2005 06:59:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3532973#M701704</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-04-27T06:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3532974#M701705</link>
      <description>Do you have to use files for data storage? You can use MySQL database. Very simple and much easier to handle the data. When you use plain text files, you should think what's gonna happen if several ppl will update the records, for example ...</description>
      <pubDate>Wed, 27 Apr 2005 07:54:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3532974#M701705</guid>
      <dc:creator>Alex Lavrov.</dc:creator>
      <dc:date>2005-04-27T07:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3532975#M701706</link>
      <description>all I tryed (i've looked searched asked for a preatty long time for a nice solution) was the Grep function. MySql will make it harder, was thinking like this:&lt;BR /&gt;file :url.txt (urls saved line-by-line)&lt;BR /&gt;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.&lt;BR /&gt;thank you</description>
      <pubDate>Wed, 27 Apr 2005 18:03:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3532975#M701706</guid>
      <dc:creator>nick majuras</dc:creator>
      <dc:date>2005-04-27T18:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3532976#M701707</link>
      <description>It sounds as if you're expecting the file to have lines whidh all differ in layout, i.e. no fixed separator between known colums etc..&lt;BR /&gt;&lt;BR /&gt;In which case, I'd be suggesting either awk or perl for their pattern matching strengths.&lt;BR /&gt;&lt;BR /&gt;But mainly, you need to learn what a regular expression is, and at the very least the basics of how they work.&lt;BR /&gt;&lt;BR /&gt;On any unix/linux box shell, type 'man regex', and you should start getting some info about how they work.</description>
      <pubDate>Wed, 27 Apr 2005 19:00:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3532976#M701707</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2005-04-27T19:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3532977#M701708</link>
      <description>If you post your url.txt file (atleast with 40 lines) and expected output from that file. We can write script to do this requirement.&lt;BR /&gt;&lt;BR /&gt;We can not attain by explaining in general words about requirement, It should be in technical flow to reach it.</description>
      <pubDate>Wed, 27 Apr 2005 23:48:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3532977#M701708</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-04-27T23:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3532978#M701709</link>
      <description>Hi Nick,&lt;BR /&gt;&lt;BR /&gt;Please post your file (or another example) and specify exactly what you want. There should be dozens of helpfull people eager to help you!&lt;BR /&gt;&lt;BR /&gt;Cheerio,&lt;BR /&gt;&lt;BR /&gt;Renarios</description>
      <pubDate>Mon, 09 May 2005 06:55:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3532978#M701709</guid>
      <dc:creator>renarios</dc:creator>
      <dc:date>2005-05-09T06:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3532979#M701710</link>
      <description>use perl and Regexp::Common&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://search.cpan.org/~abigail/Regexp-Common-2.120/" target="_blank"&gt;http://search.cpan.org/~abigail/Regexp-Common-2.120/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If you have URL's that you want to fetch&lt;BR /&gt;&lt;BR /&gt;use LWP::Simple;&lt;BR /&gt;my $content = get "&lt;A href="http://www.there.com/file.html" target="_blank"&gt;http://www.there.com/file.html&lt;/A&gt;";&lt;BR /&gt;&lt;BR /&gt;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:&lt;BR /&gt;&lt;BR /&gt;--8&amp;lt;---&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;&lt;BR /&gt;@ARGV = ("file.url");&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;if (m/&amp;lt;(\S+?\@\S+?)&amp;gt;/) {&lt;BR /&gt;print "$1\n";&lt;BR /&gt;next;&lt;BR /&gt;}&lt;BR /&gt;if (m/\b([-\w._]+\@[-\w._]+)\b/) {&lt;BR /&gt;print "$1\n";&lt;BR /&gt;next;&lt;BR /&gt;}&lt;BR /&gt;pritnSTDERR "no mail on this line\n";&lt;BR /&gt;--&amp;gt;8---&lt;BR /&gt;&lt;BR /&gt;but remember that&lt;BR /&gt;&lt;BR /&gt;"Jonder Bl'â ¦Ã Ä ÂªÄ¦" &lt;J.BLO&gt;&lt;BR /&gt;&lt;BR /&gt;is a VALID e-mail according to the RFC&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FU&lt;/J.BLO&gt;</description>
      <pubDate>Mon, 09 May 2005 07:13:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script/m-p/3532979#M701710</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-05-09T07:13:10Z</dc:date>
    </item>
  </channel>
</rss>

