<?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: Script needed in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016073#M427465</link>
    <description>Sorry Spex its giving me problems running the script : &lt;BR /&gt;&lt;BR /&gt;awk: can't open prog.awk&lt;BR /&gt;ERROR [SCCS/s.$(ls]: `SCCS/s.$(ls' nonexistent (ut4)&lt;BR /&gt;ERROR [/appl/solid/develop/SCCS/s.2006.3)]: `/appl/solid/develop/SCCS/s.2006.3)' nonexistent (ut4)&lt;BR /&gt;</description>
    <pubDate>Tue, 28 Nov 2006 16:05:59 GMT</pubDate>
    <dc:creator>Hunki</dc:creator>
    <dc:date>2006-11-28T16:05:59Z</dc:date>
    <item>
      <title>Script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016068#M427460</link>
      <description>We need to have script through which I can get a list of latest version numbers only ..like 1.20 along with the filename from which it comes.&lt;BR /&gt;&lt;BR /&gt;The command which I use to get the version history is called "sccs prs filename"&lt;BR /&gt;&lt;BR /&gt;Here is the example , it lists the latest version on the top and then then subsequent version below. I only need the latest version and the filename from the script and put it into an excel sheet for records.&lt;BR /&gt;-------------------------------------&lt;BR /&gt;$ sccs prs filename      &lt;BR /&gt;filename&lt;BR /&gt;&lt;BR /&gt;D 1.20 06/11/27 12:23:34 userid1 25 24       00012/00012/01066&lt;BR /&gt;MRs:&lt;BR /&gt;COMMENTS:&lt;BR /&gt;xxxx&lt;BR /&gt;&lt;BR /&gt;D 1.19 06/10/12 08:21:45 userid1 24 23   00006/00006/01072&lt;BR /&gt;MRs:&lt;BR /&gt;COMMENTS:&lt;BR /&gt;xxx&lt;BR /&gt;&lt;BR /&gt;D 1.18 06/10/06 09:33:49 userid1 23 22   00004/00004/01074&lt;BR /&gt;MRs:&lt;BR /&gt;COMMENTS:&lt;BR /&gt;xxxx</description>
      <pubDate>Tue, 28 Nov 2006 14:48:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016068#M427460</guid>
      <dc:creator>Hunki</dc:creator>
      <dc:date>2006-11-28T14:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016069#M427461</link>
      <description>try either:&lt;BR /&gt;&lt;BR /&gt;sccs prs -d ":Dt:" -r &lt;FILENAME&gt;&lt;BR /&gt;&lt;BR /&gt;or &lt;BR /&gt;&lt;BR /&gt;prs -d ":Dt:" -r &lt;FILENAME&gt;&lt;BR /&gt;&lt;BR /&gt;one of them should produce just the latest delta number of the filename specified.&lt;BR /&gt;&lt;BR /&gt;man "prs" for more info&lt;/FILENAME&gt;&lt;/FILENAME&gt;</description>
      <pubDate>Tue, 28 Nov 2006 15:21:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016069#M427461</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2006-11-28T15:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016070#M427462</link>
      <description>You can use this awk script:&lt;BR /&gt;&lt;BR /&gt;$ sccs prs filename | awk '&lt;BR /&gt;BEGIN {&lt;BR /&gt;getline&lt;BR /&gt;filename = $0&lt;BR /&gt;getline; getline&lt;BR /&gt;VER = $2&lt;BR /&gt;print filename "," VER&lt;BR /&gt;exit 0&lt;BR /&gt;} '&lt;BR /&gt;&lt;BR /&gt;For your above input, it prints:&lt;BR /&gt;filename,1.20</description>
      <pubDate>Tue, 28 Nov 2006 15:27:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016070#M427462</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2006-11-28T15:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: Script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016071#M427463</link>
      <description>Thanks for the reply Dennis , what i have is multiple files instead of just one and they are under one parent directory , how to go about getting the info for each file.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;hunki</description>
      <pubDate>Tue, 28 Nov 2006 15:48:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016071#M427463</guid>
      <dc:creator>Hunki</dc:creator>
      <dc:date>2006-11-28T15:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: Script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016072#M427464</link>
      <description>Hunki,&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;for file in $(ls /path/to/dir)&lt;BR /&gt;do&lt;BR /&gt;  sccs prs ${file} | awk -f prog.awk&lt;BR /&gt;done&lt;BR /&gt;exit&lt;BR /&gt;&lt;BR /&gt;PCS</description>
      <pubDate>Tue, 28 Nov 2006 15:56:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016072#M427464</guid>
      <dc:creator>spex</dc:creator>
      <dc:date>2006-11-28T15:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016073#M427465</link>
      <description>Sorry Spex its giving me problems running the script : &lt;BR /&gt;&lt;BR /&gt;awk: can't open prog.awk&lt;BR /&gt;ERROR [SCCS/s.$(ls]: `SCCS/s.$(ls' nonexistent (ut4)&lt;BR /&gt;ERROR [/appl/solid/develop/SCCS/s.2006.3)]: `/appl/solid/develop/SCCS/s.2006.3)' nonexistent (ut4)&lt;BR /&gt;</description>
      <pubDate>Tue, 28 Nov 2006 16:05:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016073#M427465</guid>
      <dc:creator>Hunki</dc:creator>
      <dc:date>2006-11-28T16:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: Script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016074#M427466</link>
      <description>Sorry Spex its giving me problems running the script : &lt;BR /&gt;&lt;BR /&gt;awk: can't open prog.awk&lt;BR /&gt;ERROR [SCCS/s.$(ls]: `SCCS/s.$(ls' nonexistent (ut4)&lt;BR /&gt;ERROR [/xx/xx/xx/s.2006.3)]: `/xx/xx/s.2006.3)' nonexistent (ut4)&lt;BR /&gt;</description>
      <pubDate>Tue, 28 Nov 2006 16:06:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016074#M427466</guid>
      <dc:creator>Hunki</dc:creator>
      <dc:date>2006-11-28T16:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: Script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016075#M427467</link>
      <description>&lt;!--!*#--&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;for i in $(ls -1 &lt;DIR_CONTAINING_FILES&gt;)&lt;BR /&gt;do&lt;BR /&gt;  sccs prs $i | awk '!/^$/{if(x){x=x" "$2;print x;exit}else x=$0}' &lt;BR /&gt;done&lt;BR /&gt;&lt;/DIR_CONTAINING_FILES&gt;</description>
      <pubDate>Tue, 28 Nov 2006 16:10:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016075#M427467</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2006-11-28T16:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: Script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016076#M427468</link>
      <description>./check_version.sh: syntax error at line 1 : `end of file' unexpected&lt;BR /&gt;</description>
      <pubDate>Tue, 28 Nov 2006 16:11:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016076#M427468</guid>
      <dc:creator>Hunki</dc:creator>
      <dc:date>2006-11-28T16:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016077#M427469</link>
      <description>&amp;gt;Sorry Spex its giving me problems running the script:&lt;BR /&gt;  awk: can't open prog.awk&lt;BR /&gt;&lt;BR /&gt;I assume Spex was pointing to my example awk script.  Just put my fragment (without the trailing "'" in prog.awk.</description>
      <pubDate>Tue, 28 Nov 2006 16:23:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016077#M427469</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2006-11-28T16:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: Script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016078#M427470</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;I ran it again Dennis but this is what I got :(&lt;BR /&gt;&lt;BR /&gt;./check_version: syntax error at line 2: `$' unexpected</description>
      <pubDate>Tue, 28 Nov 2006 16:28:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016078#M427470</guid>
      <dc:creator>Hunki</dc:creator>
      <dc:date>2006-11-28T16:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: Script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016079#M427471</link>
      <description>Hi Hunki,&lt;BR /&gt;&lt;BR /&gt;do you work under HP-UX?&lt;BR /&gt;If not,&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;may not start a posix shell. Use&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;&lt;BR /&gt;instead.&lt;BR /&gt;&lt;BR /&gt;mfG Peter&lt;BR /&gt;</description>
      <pubDate>Tue, 28 Nov 2006 17:25:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016079#M427471</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2006-11-28T17:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016080#M427472</link>
      <description>As Peter asked, what is your shell and what is its absolute path?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;for file in $(ls /path/to/dir)&lt;BR /&gt;&lt;BR /&gt;This is valid ksh or posix shell syntax and replaces the archaic ``.  But it can be simplified to:&lt;BR /&gt;for file in path/to/dir/*; do</description>
      <pubDate>Tue, 28 Nov 2006 18:57:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016080#M427472</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2006-11-28T18:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016081#M427473</link>
      <description>Hi,&lt;BR /&gt;combining the pieces of code:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;for file in `ls`&lt;BR /&gt;do&lt;BR /&gt;sccs prs $file | awk '&lt;BR /&gt;BEGIN {&lt;BR /&gt;getline&lt;BR /&gt;filename = $0&lt;BR /&gt;getline; getline&lt;BR /&gt;VER = $2&lt;BR /&gt;print filename "," VER&lt;BR /&gt;exit 0&lt;BR /&gt;}'&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Please generate a shell script (a.sh) with the above. Then "chmod 744 a.sh". To run it "./a.sh"</description>
      <pubDate>Wed, 29 Nov 2006 03:17:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016081#M427473</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-11-29T03:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: Script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016082#M427474</link>
      <description>There are sub directories also which need to be looked into ( not only the parent dir ) and my shell is ksh.&lt;BR /&gt;&lt;BR /&gt;parent dir : /appl/XXX/XXX/cur .... and there are subdirectories under it which need to be looked into.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;hunki</description>
      <pubDate>Wed, 29 Nov 2006 14:27:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016082#M427474</guid>
      <dc:creator>Hunki</dc:creator>
      <dc:date>2006-11-29T14:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: Script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016083#M427475</link>
      <description>Hi Hunki,&lt;BR /&gt;&lt;BR /&gt;just change the way the filenames in question are determined:&lt;BR /&gt;Change&lt;BR /&gt;for file in `ls`&lt;BR /&gt;do&lt;BR /&gt;...&lt;BR /&gt;to something like this:&lt;BR /&gt;find YOUR_DIRNAMES -name SCCS -prune -type f -print | while read file&lt;BR /&gt;do&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;mfG Peter&lt;BR /&gt;&lt;BR /&gt;PS: Your assignment rate for points is worth to rise...</description>
      <pubDate>Wed, 29 Nov 2006 17:15:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016083#M427475</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2006-11-29T17:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: Script needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016084#M427476</link>
      <description>Thanks specialy to OLD school and also to all of you . I have given you the required points.</description>
      <pubDate>Wed, 29 Nov 2006 17:51:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-needed/m-p/5016084#M427476</guid>
      <dc:creator>Hunki</dc:creator>
      <dc:date>2006-11-29T17:51:17Z</dc:date>
    </item>
  </channel>
</rss>

