<?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: Perl or shell script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-or-shell-script/m-p/4819349#M641618</link>
    <description>&lt;P&gt;Hi JRF,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would this suffice to create a new TAG out of svn info if the output has a TAG listed out instead of BRANCHES -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;URL: &lt;A target="_blank" href="http://svn.com/qbo/library/web/WebConfiguration/TAGS/2011-05-1"&gt;http://svn.com/qbo/library/web/WebConfiguration/TAGS/2011-05-1&lt;/A&gt;﻿﻿﻿

 

svn cp &lt;A target="_blank" href="http://svn.com/qbo/library/web/WebConfiguration/BRANCHES/2011-05"&gt;http://svn.com/qbo/library/web/WebConfiguration/BRANCHES/2011-05&lt;/A&gt;  &lt;A target="_blank" href="http://svn.com/qbo/library/web/WebConfiguration/TAGS/2011-05-2"&gt;http://svn.com/qbo/library/web/WebConfiguration/TAGS/2011-05-2&lt;/A&gt;

 &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Allan.&lt;/P&gt;</description>
    <pubDate>Fri, 08 Jul 2011 22:04:52 GMT</pubDate>
    <dc:creator>allanm77</dc:creator>
    <dc:date>2011-07-08T22:04:52Z</dc:date>
    <item>
      <title>Perl or shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-or-shell-script/m-p/4819163#M641616</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Time and again I have to tag my app configs. I want a script which can automate this process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1)First I do a svn info to get a list of configs which are pointing to BRANCHES/TAGS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;svn info * |grep URL&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;URL: &lt;A target="_blank" href="http://svn.com/qbo/library/General/GeneralConfiguration/BRANCHES/2011-05"&gt;http://svn.com/qbo/library/General/GeneralConfiguration/BRANCHES/2011-05&lt;/A&gt;&lt;BR /&gt;URL: &lt;A target="_blank" href="http://svn.com/qbo/library/Core/CoreConfiguration/BRANCHES/2011-05"&gt;http://svn.com/qbo/library/Core/CoreConfiguration/BRANCHES/2011-05&lt;/A&gt;&lt;BR /&gt;URL: &lt;A target="_blank" href="http://svn.com/qbo/library/signup/signupProcessorConfiguration/BRANCHES/2011-05"&gt;http://svn.com/qbo/library/signup/signupProcessorConfiguration/BRANCHES/2011-05&lt;/A&gt;&lt;BR /&gt;URL: &lt;A target="_blank" href="http://svn.com/qbo/library/signup/signupStatusConfiguration/BRANCHES/2011-05"&gt;http://svn.com/qbo/library/signup/signupStatusConfiguration/BRANCHES/2011-05&lt;/A&gt;&lt;BR /&gt;URL: &lt;A target="_blank" href="http://svn.com/qbo/library/signup/signupingConfiguration/BRANCHES/2011-05"&gt;http://svn.com/qbo/library/signup/signupingConfiguration/BRANCHES/2011-05&lt;/A&gt;﻿&lt;/P&gt;&lt;P&gt;URL: &lt;A target="_blank" href="http://svn.com/qbo/library/web/WebConfiguration/TAGS/2011-R05-1"&gt;http://svn.com/qbo/library/web/WebConfiguration/TAGS/2011-05-1&lt;/A&gt;﻿﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2)Now I basically find out if there are existing TAGS for the these configs with the same TAG as that I am hoping to create .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) Thirdly I create them -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;svn cp &lt;A target="_blank" href="http://svn.com/qbo/library/Core/CoreConfiguration/BRANCHES/2011-R05"&gt;http://svn.com/qbo/library/Core/CoreConfiguration/BRANCHES/2011-05&lt;/A&gt; &lt;A target="_blank" href="http://svn.com/qbo/library/Core/CoreConfiguration/TAGS/2011-R05-1"&gt;http://svn.com/qbo/library/Core/CoreConfiguration/TAGS/2011-05-1&lt;/A&gt;﻿&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF TAGS/2011-05-1﻿﻿ exists then I create a&amp;nbsp;TAGS/2011-05-2 tag.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to automate this in a way so that the script can check the existence of a tag and if it does not exists then create one or increment to the next number if there is already one created.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Allan.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2011 17:52:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-or-shell-script/m-p/4819163#M641616</guid>
      <dc:creator>allanm77</dc:creator>
      <dc:date>2011-07-08T17:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: Perl or shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-or-shell-script/m-p/4819225#M641617</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See if this fits your needs:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;#!/usr/bin/perl
use strict;
use warnings;
my $tag = shift or die "tag to match expected\n";
while (&amp;lt;&amp;gt;) {
    print;
    next unless m{$tag};
    chomp;
    if ( m{^.+\d\d\d\d\-\d\d$} ) {
        print $_ . "-1\n";
    } elsif ( m{(^.+\d\d\d\d\-\d\d\-)(\d+)$} ) {
        print $1 . ($2+1) . "\n";
    }
}
1;&lt;/PRE&gt;&lt;P&gt;...run as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# ./fixup 2011-05 file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...or :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# svn info * | ./fixup 2011-05&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is, the script expects a tag to match (e.g. 2011-05) and a file or STDIN stream.&amp;nbsp; Use your data to verify that you get what you want.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...JRF...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2011 19:13:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-or-shell-script/m-p/4819225#M641617</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-07-08T19:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Perl or shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-or-shell-script/m-p/4819349#M641618</link>
      <description>&lt;P&gt;Hi JRF,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would this suffice to create a new TAG out of svn info if the output has a TAG listed out instead of BRANCHES -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;URL: &lt;A target="_blank" href="http://svn.com/qbo/library/web/WebConfiguration/TAGS/2011-05-1"&gt;http://svn.com/qbo/library/web/WebConfiguration/TAGS/2011-05-1&lt;/A&gt;﻿﻿﻿

 

svn cp &lt;A target="_blank" href="http://svn.com/qbo/library/web/WebConfiguration/BRANCHES/2011-05"&gt;http://svn.com/qbo/library/web/WebConfiguration/BRANCHES/2011-05&lt;/A&gt;  &lt;A target="_blank" href="http://svn.com/qbo/library/web/WebConfiguration/TAGS/2011-05-2"&gt;http://svn.com/qbo/library/web/WebConfiguration/TAGS/2011-05-2&lt;/A&gt;

 &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Allan.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2011 22:04:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-or-shell-script/m-p/4819349#M641618</guid>
      <dc:creator>allanm77</dc:creator>
      <dc:date>2011-07-08T22:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Perl or shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-or-shell-script/m-p/4819363#M641619</link>
      <description>&lt;P&gt;HI (again) Allan:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1196371"&gt;@allanm77&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would this suffice to create a new TAG out of svn info if the output has a TAG listed out instead of BRANCHES -&amp;nbsp;&lt;/P&gt;...&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;It isn't clear to me exactly what you want to match and what you want to manufacture.&amp;nbsp; The suggestion I made thus far allows you to match by passing an argument like "2011-05" or "TAGS/2011-05" or "BRANCHES/2011-05" and incrementing any suffix found.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The scriptlet I offered prints out the old and newly manufactured information.&amp;nbsp; Do you want it to issue the actual 'svn cp'?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please provide a sample input and expected output (given that the output may be one or more commands).&amp;nbsp; Specify, too what *you* mean by "match".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...JRF...&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2011 22:21:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-or-shell-script/m-p/4819363#M641619</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-07-08T22:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Perl or shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-or-shell-script/m-p/4819561#M641620</link>
      <description>&lt;P&gt;Hi (again) Allan:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By the way, if you are/were known as simply "Allanm" in the old ITRC, you have several un-evaluated (scored/kudoed) threads from just before the migration:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://h30499.www3.hp.com/t5/user/viewprofilepage/user-id/1082079"&gt;http://h30499.www3.hp.com/t5/user/viewprofilepage/user-id/1082079&lt;/A&gt;﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please consider revisiting them as anyone can now assign kudos.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...JRF...&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jul 2011 12:26:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-or-shell-script/m-p/4819561#M641620</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-07-09T12:26:39Z</dc:date>
    </item>
  </channel>
</rss>

