<?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!! in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3052315#M813451</link>
    <description>thank you for all your help</description>
    <pubDate>Thu, 21 Aug 2003 23:12:41 GMT</pubDate>
    <dc:creator>mw_9</dc:creator>
    <dc:date>2003-08-21T23:12:41Z</dc:date>
    <item>
      <title>script help!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3052310#M813446</link>
      <description>Deleting from end of line to designated line&lt;BR /&gt;can you help me?&lt;BR /&gt;after backup 'oracle archive log file' then,&lt;BR /&gt;except do not backed up file,delete backed up file&lt;BR /&gt;.....&lt;BR /&gt;&lt;BR /&gt;afiedt.buf&lt;BR /&gt;arch_0000026778.arc&lt;BR /&gt;arch_0000026779.arc&lt;BR /&gt;arch_0000026780.arc&lt;BR /&gt;arch_0000026781.arc&lt;BR /&gt;arch_0000026782.arc&lt;BR /&gt;arch_0000026783.arc&lt;BR /&gt;arch_0000026784.arc&lt;BR /&gt;....&lt;BR /&gt;&lt;BR /&gt;How can I delete from last line(arch_0000026784.arc) to previous 2 or 3 line(arch_0000026782.arc,arch_0000026783.arc)&lt;BR /&gt;</description>
      <pubDate>Tue, 19 Aug 2003 23:31:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3052310#M813446</guid>
      <dc:creator>mw_9</dc:creator>
      <dc:date>2003-08-19T23:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: script help!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3052311#M813447</link>
      <description>You want to remove oracle archived logs from system. I would recommend that you remove those archived logs older than a certain date/time. You can do it via a cronjob.&lt;BR /&gt;To do so you can using the touch command to create a file at the moment of time you wish to use as cutoff, see follows: &lt;BR /&gt;&lt;BR /&gt;Script content is as follows: &lt;BR /&gt;-------------&lt;BR /&gt;touch -t 200308201230 temp&lt;BR /&gt;&lt;BR /&gt;find /arch_dir ! -newer /arch_dir/temp -exec rm {} \; &lt;BR /&gt;-------------&lt;BR /&gt;This will create temp file and set it's time to Aug 20 12:30 PM, then remove those files NOT newer than the time stamp on temp. Of course you can control this time (using date)to determine the files which you want to remove.&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Aug 2003 00:16:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3052311#M813447</guid>
      <dc:creator>twang</dc:creator>
      <dc:date>2003-08-20T00:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: script help!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3052312#M813448</link>
      <description>I was bored, so I started the script for you.  :)  Make a file with all your entries (arch_0000026778.arc  etc???) then use the script to run through the file, and based on a count you can then do anything you want.  With a little more code, you could tell it to do something from line 7 - 10, or from line 10 on.   &lt;BR /&gt;&lt;BR /&gt;Hope this helps!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-Brian.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;myfile=test.txt&lt;BR /&gt;count=`wc -l $myfile | awk '{ print $1 }'`&lt;BR /&gt;cnt=0&lt;BR /&gt;for lines in `cat $myfile`&lt;BR /&gt;do&lt;BR /&gt;if [ $cnt -eq $count ]&lt;BR /&gt;then&lt;BR /&gt;echo $lines&lt;BR /&gt;else&lt;BR /&gt;cnt=`expr $cnt + 1`&lt;BR /&gt;echo $cnt&lt;BR /&gt;fi&lt;BR /&gt;done</description>
      <pubDate>Wed, 20 Aug 2003 02:42:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3052312#M813448</guid>
      <dc:creator>Brian Markus</dc:creator>
      <dc:date>2003-08-20T02:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: script help!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3052313#M813449</link>
      <description>Hi,&lt;BR /&gt;To remove the tree oldest files:&lt;BR /&gt;rm `ls -t *.arc |tail -3`&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Aug 2003 06:27:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3052313#M813449</guid>
      <dc:creator>Leif Halvarsson_2</dc:creator>
      <dc:date>2003-08-20T06:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: script help!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3052314#M813450</link>
      <description>How do you backup the archive?&lt;BR /&gt;best way, if you use rman, would be to use&lt;BR /&gt;&lt;BR /&gt;"archivelog all delete input;"&lt;BR /&gt;&lt;BR /&gt;in the rman script.&lt;BR /&gt;&lt;BR /&gt;Else, Leif's solution may be the best....&lt;BR /&gt;&lt;BR /&gt;    Massimo&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Aug 2003 06:47:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3052314#M813450</guid>
      <dc:creator>Massimo Bianchi</dc:creator>
      <dc:date>2003-08-20T06:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: script help!!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3052315#M813451</link>
      <description>thank you for all your help</description>
      <pubDate>Thu, 21 Aug 2003 23:12:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3052315#M813451</guid>
      <dc:creator>mw_9</dc:creator>
      <dc:date>2003-08-21T23:12:41Z</dc:date>
    </item>
  </channel>
</rss>

