<?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: Unix Command needed or Procedure in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-command-needed-or-procedure/m-p/2909087#M719707</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;# echo "S.O."|sed -e 's/\.$//'&lt;BR /&gt;&lt;BR /&gt;# echo $filename|sed -e 's/\.$//'&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
    <pubDate>Thu, 20 Feb 2003 12:22:20 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2003-02-20T12:22:20Z</dc:date>
    <item>
      <title>Unix Command needed or Procedure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-command-needed-or-procedure/m-p/2909085#M719705</link>
      <description>Is there any Unix command or procedure to check the last character of a file-name? If it is "." then rename this file-name without this "."&lt;BR /&gt;&lt;BR /&gt;example :&lt;BR /&gt;&lt;BR /&gt;file-name = "S.O."&lt;BR /&gt;&lt;BR /&gt;the last character is ".", so to rename S.O. by S.O&lt;BR /&gt;&lt;BR /&gt;=============================================&lt;BR /&gt;&lt;BR /&gt;Thank you for your assistance</description>
      <pubDate>Thu, 20 Feb 2003 12:15:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-command-needed-or-procedure/m-p/2909085#M719705</guid>
      <dc:creator>Engo Armand-Blaise</dc:creator>
      <dc:date>2003-02-20T12:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Unix Command needed or Procedure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-command-needed-or-procedure/m-p/2909086#M719706</link>
      <description>You can use the find command:&lt;BR /&gt;&lt;BR /&gt;root /tmp &amp;gt;ll&lt;BR /&gt;total 108520&lt;BR /&gt;drwx------   2 root       root          1024 Feb  6 16:44 .AgentSockets&lt;BR /&gt;-rw-r--r--   1 root       root            23 Feb  6 16:44 96.sh&lt;BR /&gt;-rw-r-----   1 root       sys        55511040 Feb 18 13:00 Ignite-UX-11-00.depot&lt;BR /&gt;&lt;BR /&gt;prw-rw-rw-   1 root       root             0 Feb  6 16:44 dhcpfifo.any&lt;BR /&gt;prw-rw-rw-   1 root       root             0 Feb  6 16:44 dhcpfifo.root&lt;BR /&gt;-rw-rw-rw-   1 root       root            16 Feb  6 16:45 last_uuid&lt;BR /&gt;-r--r--r--   1 root       root             0 Feb  6 16:44 llbdbase.dat&lt;BR /&gt;drwxrwxrwx   2 afeller    users         1024 Nov 15 11:26 modemlog&lt;BR /&gt;root /tmp &amp;gt;find . -name '*t'&lt;BR /&gt;./dhcpfifo.root&lt;BR /&gt;./llbdbase.dat&lt;BR /&gt;./Ignite-UX-11-00.depot&lt;BR /&gt;root /tmp &amp;gt;&lt;BR /&gt;&lt;BR /&gt;Regards ...&lt;BR /&gt;Armin</description>
      <pubDate>Thu, 20 Feb 2003 12:21:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-command-needed-or-procedure/m-p/2909086#M719706</guid>
      <dc:creator>Armin Feller</dc:creator>
      <dc:date>2003-02-20T12:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: Unix Command needed or Procedure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-command-needed-or-procedure/m-p/2909087#M719707</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;# echo "S.O."|sed -e 's/\.$//'&lt;BR /&gt;&lt;BR /&gt;# echo $filename|sed -e 's/\.$//'&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Thu, 20 Feb 2003 12:22:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-command-needed-or-procedure/m-p/2909087#M719707</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2003-02-20T12:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: Unix Command needed or Procedure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-command-needed-or-procedure/m-p/2909088#M719708</link>
      <description>filename=S.O.&lt;BR /&gt;&lt;BR /&gt;if [[ -n ${filename##*[!.]} ]]; then&lt;BR /&gt;echo dot at the end&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Best regards...&lt;BR /&gt; Dietmar.</description>
      <pubDate>Thu, 20 Feb 2003 12:30:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-command-needed-or-procedure/m-p/2909088#M719708</guid>
      <dc:creator>Dietmar Konermann</dc:creator>
      <dc:date>2003-02-20T12:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: Unix Command needed or Procedure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-command-needed-or-procedure/m-p/2909089#M719709</link>
      <description>Thank you for your help. would make sure that I've made a mistake :&lt;BR /&gt;&lt;BR /&gt;cyb_hpux [ /consult/6/runs ] # export filename="S.O."&lt;BR /&gt;cyb_hpux [ /consult/6/runs ] # echo $filename&lt;BR /&gt;S.O.&lt;BR /&gt;cyb_hpux [ /consult/6/runs ] # echo $filename|sed -e 's^.$//'&lt;BR /&gt;sed: Function s^.$// cannot be parsed.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Thu, 20 Feb 2003 12:34:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-command-needed-or-procedure/m-p/2909089#M719709</guid>
      <dc:creator>Engo Armand-Blaise</dc:creator>
      <dc:date>2003-02-20T12:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Unix Command needed or Procedure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-command-needed-or-procedure/m-p/2909090#M719710</link>
      <description>Hi Engo,&lt;BR /&gt;you can also list file names  ending in dot with grep, e.g.:&lt;BR /&gt;&lt;BR /&gt;# ls armand_blaise&lt;BR /&gt;file1   file1.  file2   file3&lt;BR /&gt;&lt;BR /&gt;# ls armand_blaise/ | grep "\.$"&lt;BR /&gt;file1.&lt;BR /&gt;&lt;BR /&gt;but before renaming you should perhaps check if the filename without the dot already exists.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.&lt;BR /&gt;</description>
      <pubDate>Thu, 20 Feb 2003 12:34:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-command-needed-or-procedure/m-p/2909090#M719710</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2003-02-20T12:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: Unix Command needed or Procedure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-command-needed-or-procedure/m-p/2909091#M719711</link>
      <description>Ah... you wanted to rename.&lt;BR /&gt;&lt;BR /&gt;# mv "$filename" "${filename%.}"&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 20 Feb 2003 12:35:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-command-needed-or-procedure/m-p/2909091#M719711</guid>
      <dc:creator>Dietmar Konermann</dc:creator>
      <dc:date>2003-02-20T12:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: Unix Command needed or Procedure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-command-needed-or-procedure/m-p/2909092#M719712</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;for file in `ls * | grep '\.$'`;do&lt;BR /&gt;        echo mv $file ${file%.}&lt;BR /&gt;        done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;rgds, Robin</description>
      <pubDate>Thu, 20 Feb 2003 12:36:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-command-needed-or-procedure/m-p/2909092#M719712</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2003-02-20T12:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Unix Command needed or Procedure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-command-needed-or-procedure/m-p/2909093#M719713</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;You typed:&lt;BR /&gt;&lt;BR /&gt;# echo $filename|sed -e 's^.$//' &lt;BR /&gt;&lt;BR /&gt;...but you should have:&lt;BR /&gt;&lt;BR /&gt;# echo "$filename"|sed -e 's/\.$//' &lt;BR /&gt;&lt;BR /&gt;I choose to use 'sed' but Dietmar's use of the shell's builtins is faster.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 20 Feb 2003 12:40:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-command-needed-or-procedure/m-p/2909093#M719713</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2003-02-20T12:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: Unix Command needed or Procedure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-command-needed-or-procedure/m-p/2909094#M719714</link>
      <description>Hi,&lt;BR /&gt;As I can see you have got a solution already but perhaps you should have a look at the "basename" command which can be used for removing suffixes.&lt;BR /&gt;Examole:&lt;BR /&gt;#  &amp;gt;S.O.&lt;BR /&gt;# ls S.O*&lt;BR /&gt;S.O.&lt;BR /&gt;# basename S.O. .&lt;BR /&gt;S.O&lt;BR /&gt;# mv S.O. `basename S.O. .`&lt;BR /&gt;# ls S.O*&lt;BR /&gt;S.O&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 20 Feb 2003 13:36:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-command-needed-or-procedure/m-p/2909094#M719714</guid>
      <dc:creator>Leif Halvarsson_2</dc:creator>
      <dc:date>2003-02-20T13:36:46Z</dc:date>
    </item>
  </channel>
</rss>

