<?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: remove file in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-file/m-p/2852049#M93863</link>
    <description>Just a general hint before you do any deletions,&lt;BR /&gt;use the shell built-in echo command to see what the shell expands your wildcards (i.e. meta characters) to.&lt;BR /&gt;&lt;BR /&gt;Maybe this is not quite what you want, but remember that you can exclude certain character sets with the '!'&lt;BR /&gt;&lt;BR /&gt;e.g.&lt;BR /&gt;&lt;BR /&gt;echo a[!26]*&lt;BR /&gt;&lt;BR /&gt;However in your case a more subtle parsing is required, where I would use commands that can handle regular expressions (e.g. grep, sed, awk, perl)</description>
    <pubDate>Tue, 26 Nov 2002 09:19:33 GMT</pubDate>
    <dc:creator>Ralph Grothe</dc:creator>
    <dc:date>2002-11-26T09:19:33Z</dc:date>
    <item>
      <title>remove file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-file/m-p/2852046#M93860</link>
      <description>I world like to remove some files but omit one or part of these files, how to do it? &lt;BR /&gt;&lt;BR /&gt;eg. &lt;BR /&gt;$ ls&lt;BR /&gt;a1  a2 a3  a4 a5&lt;BR /&gt;a6 ab a8 a9 a10&lt;BR /&gt;a1b  a2b&lt;BR /&gt;&lt;BR /&gt;if I run ??? rm a* ??? , then all files will be removed , how can I omit to remove a2 &amp;amp; a6 and the file name ended with ???b???? Thx.&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Nov 2002 09:01:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-file/m-p/2852046#M93860</guid>
      <dc:creator>Cheung_2</dc:creator>
      <dc:date>2002-11-26T09:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: remove file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-file/m-p/2852047#M93861</link>
      <description>The easiest way to do this is just tu use rm in interactive mode ie&lt;BR /&gt;rm -i a*&lt;BR /&gt;Then just answer y to the files you wish to remove.&lt;BR /&gt;This way will be 100 times quicker than trying to find some kind of pattern match.&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;&lt;BR /&gt;Robert Thorneycroft</description>
      <pubDate>Tue, 26 Nov 2002 09:08:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-file/m-p/2852047#M93861</guid>
      <dc:creator>Robert Thorneycroft</dc:creator>
      <dc:date>2002-11-26T09:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: remove file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-file/m-p/2852048#M93862</link>
      <description>One of the easiest ways is to use:&lt;BR /&gt;&lt;BR /&gt;# rm -i</description>
      <pubDate>Tue, 26 Nov 2002 09:09:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-file/m-p/2852048#M93862</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2002-11-26T09:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: remove file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-file/m-p/2852049#M93863</link>
      <description>Just a general hint before you do any deletions,&lt;BR /&gt;use the shell built-in echo command to see what the shell expands your wildcards (i.e. meta characters) to.&lt;BR /&gt;&lt;BR /&gt;Maybe this is not quite what you want, but remember that you can exclude certain character sets with the '!'&lt;BR /&gt;&lt;BR /&gt;e.g.&lt;BR /&gt;&lt;BR /&gt;echo a[!26]*&lt;BR /&gt;&lt;BR /&gt;However in your case a more subtle parsing is required, where I would use commands that can handle regular expressions (e.g. grep, sed, awk, perl)</description>
      <pubDate>Tue, 26 Nov 2002 09:19:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-file/m-p/2852049#M93863</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2002-11-26T09:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: remove file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-file/m-p/2852050#M93864</link>
      <description>Hi,&lt;BR /&gt;One method you can use when you want to do something with a large number of files (not necessary removing them) is to list to a file and use a text editor to process the file. Then you can use this file as input to a script. Example:&lt;BR /&gt;&lt;BR /&gt;ls a* &amp;gt;tmpfile&lt;BR /&gt;&lt;BR /&gt;vi tmpfile&lt;BR /&gt;&lt;BR /&gt;while read file&lt;BR /&gt;do&lt;BR /&gt;#do something&lt;BR /&gt;done &lt;TMPFILE&gt;&lt;/TMPFILE&gt;</description>
      <pubDate>Tue, 26 Nov 2002 09:28:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-file/m-p/2852050#M93864</guid>
      <dc:creator>Leif Halvarsson_2</dc:creator>
      <dc:date>2002-11-26T09:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: remove file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-file/m-p/2852051#M93865</link>
      <description>&lt;BR /&gt;#/bin/sh&lt;BR /&gt;&lt;BR /&gt;for index in `ls a* |grep -v "a[26]"`&lt;BR /&gt;do&lt;BR /&gt;echo "== removing $index =="&lt;BR /&gt;rm -rf $index&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-Niraj</description>
      <pubDate>Tue, 26 Nov 2002 09:39:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-file/m-p/2852051#M93865</guid>
      <dc:creator>Niraj Kumar Verma</dc:creator>
      <dc:date>2002-11-26T09:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: remove file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-file/m-p/2852052#M93866</link>
      <description>hi guys&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;command :&lt;BR /&gt;rm a1 a[3-5] a[8-10]&lt;BR /&gt;&lt;BR /&gt;omit to remove a2 - a6 - a1b and a2b</description>
      <pubDate>Tue, 26 Nov 2002 09:41:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-file/m-p/2852052#M93866</guid>
      <dc:creator>justin berkman</dc:creator>
      <dc:date>2002-11-26T09:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: remove file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-file/m-p/2852053#M93867</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;egrep (or grep -E) with multiple patterns could do it.&lt;BR /&gt;&lt;BR /&gt;rm -i $(ls a* | egrep -v 'a2|a6|b$')&lt;BR /&gt;&lt;BR /&gt;regards</description>
      <pubDate>Tue, 26 Nov 2002 09:47:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-file/m-p/2852053#M93867</guid>
      <dc:creator>Jean-Louis Phelix</dc:creator>
      <dc:date>2002-11-26T09:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: remove file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-file/m-p/2852054#M93868</link>
      <description>Jimmy your substitution [8-10] will not work as the value in brackets will only substitute a single character, which 10 is not.</description>
      <pubDate>Tue, 26 Nov 2002 09:47:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-file/m-p/2852054#M93868</guid>
      <dc:creator>Robert Thorneycroft</dc:creator>
      <dc:date>2002-11-26T09:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: remove file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remove-file/m-p/2852055#M93869</link>
      <description>hi guys&lt;BR /&gt;&lt;BR /&gt;the correct command is :&lt;BR /&gt;&lt;BR /&gt;rm a1 a[3-5] a[8-9] a10&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;excuse me for the error</description>
      <pubDate>Tue, 26 Nov 2002 10:14:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remove-file/m-p/2852055#M93869</guid>
      <dc:creator>justin berkman</dc:creator>
      <dc:date>2002-11-26T10:14:28Z</dc:date>
    </item>
  </channel>
</rss>

