<?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 help for omni. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-for-omni/m-p/5292989#M641802</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1211501"&gt;@kampatel&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;(root):/var/scripts#sort -t"/" -nk1,1 -nk2,2 list.final Usage: sort [-AbcdfiMmnru] [-T Directory] [-tCharacter] [-y kilobytes] [-o File] [-k Keydefinition].. [[+Position1][-Position2]].. [-z recsz] [File]..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not working&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hi (again):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For HP-UX that should be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# awk '{print $2,$1}' file | sort -t"/"&amp;nbsp; -kk1,1 -kn2,2 | head -2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...though reversing the 'k' and 'n' options works on Apple :-)&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, 05 Aug 2011 16:40:13 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2011-08-05T16:40:13Z</dc:date>
    <item>
      <title>Script help for omni.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-for-omni/m-p/5292963#M641796</link>
      <description>&lt;P&gt;I am trying to write a script wherein I want to initialize two nearest date protected tape from current date&amp;nbsp;for the fields as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;root):/home/root#omnimm -list_pool Development&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Status Medium Label&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Location&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Full Protected&lt;/P&gt;&lt;P&gt;===============================================================================&lt;/P&gt;&lt;P&gt;Good [NFC777L2] Development&amp;nbsp; [HP:MSL6000 Series:&amp;nbsp;&amp;nbsp;&amp;nbsp; 25]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Yes&amp;nbsp; &lt;STRONG&gt;08/06/11&amp;nbsp; - initialize via script&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Good [NFC774L2] Development&amp;nbsp; [HP:MSL6000 Series:&amp;nbsp;&amp;nbsp;&amp;nbsp; 22]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Yes&amp;nbsp; 08/14/11&lt;/P&gt;&lt;P&gt;Good [NFC773L2] Development&amp;nbsp; [HP:MSL6000 Series:&amp;nbsp;&amp;nbsp;&amp;nbsp; 24]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Yes&amp;nbsp; &lt;STRONG&gt;08/07/11 - initialize via script&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Good [NFC784L2] Development&amp;nbsp; [HP:MSL6000 Series:&amp;nbsp;&amp;nbsp;&amp;nbsp; 23]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Yes&amp;nbsp; 08/13/11&lt;/P&gt;&lt;P&gt;Good [NFC787L2] Development&amp;nbsp; [HP:MSL6000 Series:&amp;nbsp;&amp;nbsp;&amp;nbsp; 26]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; No&amp;nbsp;&amp;nbsp; 08/14/11&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will initialize the script on friday so if the date is Aug 5 then the nearest date&amp;nbsp;are 08/06 and 08/07 then these&amp;nbsp; should be initialized by command "omnimm -recycle"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got the two fields by awk and sed&amp;nbsp;as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NFC777L2&amp;nbsp; &lt;STRONG&gt;08/06/11&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;NFC774L2&amp;nbsp; 08/14/11&lt;BR /&gt;NFC773L2&amp;nbsp; &lt;STRONG&gt;08/07/11&lt;/STRONG&gt;&lt;BR /&gt;NFC784L2&amp;nbsp; 08/13/11&lt;BR /&gt;NFC787L2&amp;nbsp; 08/14/11&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to&amp;nbsp;take nearest two days&amp;nbsp;with&amp;nbsp;respect to current date and&amp;nbsp;initializ&amp;nbsp; it via script but not sure how to put them in action.&amp;nbsp;Any suggestion would&amp;nbsp;be highly helpful. &amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanking you in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2011 16:12:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-for-omni/m-p/5292963#M641796</guid>
      <dc:creator>kampatel</dc:creator>
      <dc:date>2011-08-05T16:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: Script help for omni.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-for-omni/m-p/5292977#M641797</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How about something as simple as this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# awk '{print $2,$1}' file | sort -t"/"&amp;nbsp; -nk1,1 -nk2,2 | head -2&lt;BR /&gt;﻿&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, 05 Aug 2011 16:35:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-for-omni/m-p/5292977#M641797</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-08-05T16:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: Script help for omni.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-for-omni/m-p/5292979#M641798</link>
      <description>&lt;P&gt;Ideally you would use a language that supports date arithmetic like perl.&amp;nbsp; Then you can sort and pick the closest two.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2011 16:31:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-for-omni/m-p/5292979#M641798</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-08-05T16:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Script help for omni.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-for-omni/m-p/5292981#M641799</link>
      <description>&lt;P&gt;(root):/var/scripts#sort -t"/" -nk1,1 -nk2,2 list.final Usage: sort [-AbcdfiMmnru] [-T Directory] [-tCharacter] [-y kilobytes] [-o File] [-k Keydefinition].. [[+Position1][-Position2]].. [-z recsz] [File]..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not working&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2011 16:35:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-for-omni/m-p/5292981#M641799</guid>
      <dc:creator>kampatel</dc:creator>
      <dc:date>2011-08-05T16:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: Script help for omni.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-for-omni/m-p/5292985#M641800</link>
      <description>&lt;P&gt;Not good in perl.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2011 16:36:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-for-omni/m-p/5292985#M641800</guid>
      <dc:creator>kampatel</dc:creator>
      <dc:date>2011-08-05T16:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: Script help for omni.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-for-omni/m-p/5292987#M641801</link>
      <description>&lt;P&gt;&amp;gt;sort -t"/" -nk1,1 -nk2,2 list.final﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It probably doesn't like the -n before the -k: sort -t"/" -k1,1n -k2,2n list.final﻿﻿&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2011 16:40:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-for-omni/m-p/5292987#M641801</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-08-05T16:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: Script help for omni.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-for-omni/m-p/5292989#M641802</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1211501"&gt;@kampatel&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;(root):/var/scripts#sort -t"/" -nk1,1 -nk2,2 list.final Usage: sort [-AbcdfiMmnru] [-T Directory] [-tCharacter] [-y kilobytes] [-o File] [-k Keydefinition].. [[+Position1][-Position2]].. [-z recsz] [File]..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not working&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hi (again):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For HP-UX that should be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# awk '{print $2,$1}' file | sort -t"/"&amp;nbsp; -kk1,1 -kn2,2 | head -2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...though reversing the 'k' and 'n' options works on Apple :-)&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, 05 Aug 2011 16:40:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-for-omni/m-p/5292989#M641802</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-08-05T16:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: Script help for omni.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-for-omni/m-p/5292991#M641803</link>
      <description>&lt;P&gt;root):/var/scripts#awk '{print $2,$1}' list.final | sort -t"/"&amp;nbsp; -kk1,1 -kn2,2 | head -2&lt;BR /&gt;Usage: sort [-AbcdfiMmnru] [-T Directory] [-tCharacter] [-y kilobytes] [-o File]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [-k Keydefinition].. [[+Position1][-Position2]].. [-z recsz] [File]..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry, Not working again.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2011 16:42:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-for-omni/m-p/5292991#M641803</guid>
      <dc:creator>kampatel</dc:creator>
      <dc:date>2011-08-05T16:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Script help for omni.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-for-omni/m-p/5292997#M641804</link>
      <description>&lt;P&gt;&amp;gt;For HP-UX that should be: ... | sort -t"/"&amp;nbsp; -kk1,1 -kn2,2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sort(1) says that the type is after the field start or end: field_start [ type ] [,field_end [ type ] ]﻿&lt;/P&gt;&lt;P&gt;Unless you want to use the global -n:&amp;nbsp; sort -t"/"&amp;nbsp; -n -k1,1 -k2,2 list.final﻿﻿﻿&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2011 16:50:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-for-omni/m-p/5292997#M641804</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-08-05T16:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: Script help for omni.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-for-omni/m-p/5292999#M641805</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1211501"&gt;@kampatel&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;root):/var/scripts#awk '{print $2,$1}' list.final | sort -t"/"&amp;nbsp; -kk1,1 -kn2,2 | head -2&lt;BR /&gt;Usage: sort [-AbcdfiMmnru] [-T Directory] [-tCharacter] [-y kilobytes] [-o File]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [-k Keydefinition].. [[+Position1][-Position2]].. [-z recsz] [File]..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry, Not working again.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes, and I can't type :-)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# awk '{print $2,$1}' file | sort -t"/"&amp;nbsp; -kn1,1 -kn2,2 | head -2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...not '-kk' as you copied from my mangled post.&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, 05 Aug 2011 16:45:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-for-omni/m-p/5292999#M641805</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-08-05T16:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: Script help for omni.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-for-omni/m-p/5295193#M641806</link>
      <description>&lt;P&gt;Thanks all getting the desired result.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2011 10:42:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-for-omni/m-p/5295193#M641806</guid>
      <dc:creator>kampatel</dc:creator>
      <dc:date>2011-08-09T10:42:08Z</dc:date>
    </item>
  </channel>
</rss>

