<?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 Bounre shell script help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/bounre-shell-script-help/m-p/2864737#M821301</link>
    <description>Hey, I have trouble with one of my bourne shell script homework. Could anyone help me out? Any help appreciated.&lt;BR /&gt;&lt;BR /&gt;The vi editor does not create backup copies as do some editors. If you edit a file and write the file to disk, you lose the orgial file. Write a Bourne shell script called "myvi" that will create a ".bak" file if you mkade any editing changes to the file while in vi.</description>
    <pubDate>Sun, 15 Dec 2002 21:54:28 GMT</pubDate>
    <dc:creator>windflower_1</dc:creator>
    <dc:date>2002-12-15T21:54:28Z</dc:date>
    <item>
      <title>Bounre shell script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bounre-shell-script-help/m-p/2864737#M821301</link>
      <description>Hey, I have trouble with one of my bourne shell script homework. Could anyone help me out? Any help appreciated.&lt;BR /&gt;&lt;BR /&gt;The vi editor does not create backup copies as do some editors. If you edit a file and write the file to disk, you lose the orgial file. Write a Bourne shell script called "myvi" that will create a ".bak" file if you mkade any editing changes to the file while in vi.</description>
      <pubDate>Sun, 15 Dec 2002 21:54:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bounre-shell-script-help/m-p/2864737#M821301</guid>
      <dc:creator>windflower_1</dc:creator>
      <dc:date>2002-12-15T21:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Bounre shell script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bounre-shell-script-help/m-p/2864738#M821302</link>
      <description />
      <pubDate>Sun, 15 Dec 2002 22:42:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bounre-shell-script-help/m-p/2864738#M821302</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2002-12-15T22:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: Bounre shell script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bounre-shell-script-help/m-p/2864739#M821303</link>
      <description>Just copy the file being edited.. &lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;if [ "$#" = "0" ] ; then&lt;BR /&gt;echo " Wrong Usage:&lt;BR /&gt;       Please enter the file name to be edited:"&lt;BR /&gt;exit&lt;BR /&gt;fi&lt;BR /&gt;file=$1&lt;BR /&gt;cp $file $file.ori&lt;BR /&gt;vi $file&lt;BR /&gt;&lt;BR /&gt;Use this script and see how it goes.&lt;BR /&gt;syntax to run is:&lt;BR /&gt;./myvi.sh &lt;FILE&gt;&lt;BR /&gt;it copies file to file.ori and makes the changes to file.&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Rajeev&lt;/FILE&gt;</description>
      <pubDate>Sun, 15 Dec 2002 22:55:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bounre-shell-script-help/m-p/2864739#M821303</guid>
      <dc:creator>Rajeev  Shukla</dc:creator>
      <dc:date>2002-12-15T22:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: Bounre shell script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bounre-shell-script-help/m-p/2864740#M821304</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You will need to consider using "RCS" or "SCCS" for keeping revisions of files. Just create an archive of your file using the command "ci", check out the file using "co", use it. Once you are done with the changes, check it in back into the archive so that this copy will be safe. In case if you want to go back, you can always check out the previous version from the archive file.&lt;BR /&gt;&lt;BR /&gt;You can keep revisions and can get the file of any date and anytime you want.&lt;BR /&gt;&lt;BR /&gt;Look at "rcs" man page for more details.&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Sun, 15 Dec 2002 23:56:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bounre-shell-script-help/m-p/2864740#M821304</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2002-12-15T23:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Bounre shell script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bounre-shell-script-help/m-p/2864741#M821305</link>
      <description>There is no need for anything special.&lt;BR /&gt;&lt;BR /&gt;You can just use the "view" editor instead of "vi".&lt;BR /&gt;&lt;BR /&gt;If you use view then the original file opened will be marked as readonly and you can make changes to the original file.&lt;BR /&gt;&lt;BR /&gt;Revert</description>
      <pubDate>Mon, 16 Dec 2002 03:46:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bounre-shell-script-help/m-p/2864741#M821305</guid>
      <dc:creator>T G Manikandan</dc:creator>
      <dc:date>2002-12-16T03:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: Bounre shell script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bounre-shell-script-help/m-p/2864742#M821306</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;if you are using the *classical* ZZ to save your files, your could simply put a "macro" into your "$HOME/.exrc" to save the old file first:&lt;BR /&gt;&lt;BR /&gt;"this goes into your $HOME/.exrc&lt;BR /&gt;"comments after a quote are fine&lt;BR /&gt;map ZZ :!cp % %.org^V^M:wq^V^M&lt;BR /&gt;"the ^V^M is Ctrl-V, Ctrl-M&lt;BR /&gt;&lt;BR /&gt;Well, the "map" line alone would be fine. Next time you start your "vi" and try to save something with "ZZ" (in commadn mode), you should get a the original move aside as "*.old".&lt;BR /&gt;You'll need write permission in that directory, though...&lt;BR /&gt;&lt;BR /&gt;FWIW,&lt;BR /&gt;Wodisch&lt;BR /&gt;PS: maybe "vim" would be a better solution, I think you can instruct that to make a copy automatically...&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Dec 2002 00:59:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bounre-shell-script-help/m-p/2864742#M821306</guid>
      <dc:creator>Wodisch</dc:creator>
      <dc:date>2002-12-17T00:59:09Z</dc:date>
    </item>
  </channel>
</rss>

