<?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: About script writing in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/about-script-writing/m-p/2995418#M125261</link>
    <description>Hi&lt;BR /&gt;&lt;BR /&gt;If you are new to shell scripting, please buy&lt;BR /&gt;this book Hands-On Kronshell93 programming&lt;BR /&gt;(ISBN:0-201-31018X other book is Kronshell&lt;BR /&gt;Programming Tutorial by Barry Rosenberg&lt;BR /&gt;&lt;BR /&gt;The latest is KSH93 go for it,grate book&lt;BR /&gt;by very clear examples.&lt;BR /&gt;&lt;BR /&gt;You can become shell Master.&lt;BR /&gt;&lt;BR /&gt;Good luck&lt;BR /&gt;&lt;BR /&gt;Ashan&lt;BR /&gt;</description>
    <pubDate>Thu, 12 Jun 2003 23:57:51 GMT</pubDate>
    <dc:creator>ashan</dc:creator>
    <dc:date>2003-06-12T23:57:51Z</dc:date>
    <item>
      <title>About script writing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-script-writing/m-p/2995411#M125254</link>
      <description>I am new comer to use unix to write shell script , could you give me some hints to do that . my situation as below.&lt;BR /&gt;&lt;BR /&gt;The user will generate some .txt files to the system , how can i write a script to change all these .txt to .prn format ?</description>
      <pubDate>Thu, 12 Jun 2003 06:51:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-script-writing/m-p/2995411#M125254</guid>
      <dc:creator>juno2</dc:creator>
      <dc:date>2003-06-12T06:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: About script writing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-script-writing/m-p/2995412#M125255</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;do you want to change only the name, or do you want to actually change the contents ? If you want to change the contents, I suggest you use perl. And you you need to understand the format of the prn file, which I'm not familiar with.&lt;BR /&gt;&lt;BR /&gt;If prn is a binary file, you need to other tools than shell commands to do the job.&lt;BR /&gt;&lt;BR /&gt;Rgds Jarle&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Jun 2003 06:57:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-script-writing/m-p/2995412#M125255</guid>
      <dc:creator>Jarle Bjorgeengen</dc:creator>
      <dc:date>2003-06-12T06:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: About script writing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-script-writing/m-p/2995413#M125256</link>
      <description>thx reply, it is only plain txt files , and only change the file name , no need to change the content. thx</description>
      <pubDate>Thu, 12 Jun 2003 07:02:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-script-writing/m-p/2995413#M125256</guid>
      <dc:creator>juno2</dc:creator>
      <dc:date>2003-06-12T07:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: About script writing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-script-writing/m-p/2995414#M125257</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;try this :&lt;BR /&gt;&lt;BR /&gt;for FILE in $(find &lt;YOUR directory=""&gt; -name "*.txt")&lt;BR /&gt;do&lt;BR /&gt;mv $FILE $(dirname $FILE )/$(basename $FILE | cut -d. -f1)&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Fr??d??ric&lt;BR /&gt;&lt;/YOUR&gt;</description>
      <pubDate>Thu, 12 Jun 2003 07:14:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-script-writing/m-p/2995414#M125257</guid>
      <dc:creator>Frederic Sevestre</dc:creator>
      <dc:date>2003-06-12T07:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: About script writing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-script-writing/m-p/2995415#M125258</link>
      <description>Right,&lt;BR /&gt;&lt;BR /&gt;try this.&lt;BR /&gt;&lt;BR /&gt;#$/bin/sh&lt;BR /&gt;&lt;BR /&gt;for i in $(ls /your_directory_with_txt_files/*.txt)&lt;BR /&gt;do&lt;BR /&gt;mv $i /your_directory_with_txt_files/$(basename $i .txt).prn&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Or you could give the directory as an argument to the script, and replace your_directory_with_txt_files with $1&lt;BR /&gt;&lt;BR /&gt;Rgds Jarle&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Jun 2003 07:16:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-script-writing/m-p/2995415#M125258</guid>
      <dc:creator>Jarle Bjorgeengen</dc:creator>
      <dc:date>2003-06-12T07:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: About script writing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-script-writing/m-p/2995416#M125259</link>
      <description>Thx all.</description>
      <pubDate>Thu, 12 Jun 2003 07:51:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-script-writing/m-p/2995416#M125259</guid>
      <dc:creator>juno2</dc:creator>
      <dc:date>2003-06-12T07:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: About script writing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-script-writing/m-p/2995417#M125260</link>
      <description>scripting is fun (ok... i'm sick but i enjoy it).  If you'd like to get some books on it I would recommend.&lt;BR /&gt;&lt;BR /&gt;"Korn Shell Programming by example" by O'Brien, Pitts&lt;BR /&gt;&lt;BR /&gt;&amp;amp;&lt;BR /&gt;&lt;BR /&gt;"sed &amp;amp; awk" by Dougherty &amp;amp; Robbins&lt;BR /&gt;&lt;BR /&gt;for your problem I would write this script:&lt;BR /&gt;&lt;BR /&gt;#! /usr/bin/ksh&lt;BR /&gt;for i in $(ls /path/to/files)&lt;BR /&gt;do&lt;BR /&gt;file=$(echo $i | sed 's/.txt//g')&lt;BR /&gt;mv $file $file.txt&lt;BR /&gt;done</description>
      <pubDate>Thu, 12 Jun 2003 12:33:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-script-writing/m-p/2995417#M125260</guid>
      <dc:creator>John Meissner</dc:creator>
      <dc:date>2003-06-12T12:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: About script writing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-script-writing/m-p/2995418#M125261</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;If you are new to shell scripting, please buy&lt;BR /&gt;this book Hands-On Kronshell93 programming&lt;BR /&gt;(ISBN:0-201-31018X other book is Kronshell&lt;BR /&gt;Programming Tutorial by Barry Rosenberg&lt;BR /&gt;&lt;BR /&gt;The latest is KSH93 go for it,grate book&lt;BR /&gt;by very clear examples.&lt;BR /&gt;&lt;BR /&gt;You can become shell Master.&lt;BR /&gt;&lt;BR /&gt;Good luck&lt;BR /&gt;&lt;BR /&gt;Ashan&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Jun 2003 23:57:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-script-writing/m-p/2995418#M125261</guid>
      <dc:creator>ashan</dc:creator>
      <dc:date>2003-06-12T23:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: About script writing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-script-writing/m-p/2995419#M125262</link>
      <description />
      <pubDate>Fri, 13 Jun 2003 00:38:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-script-writing/m-p/2995419#M125262</guid>
      <dc:creator>twang</dc:creator>
      <dc:date>2003-06-13T00:38:54Z</dc:date>
    </item>
  </channel>
</rss>

