<?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: Bourne shell script in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956018#M76931</link>
    <description>hi sophia,&lt;BR /&gt;is this some kind of a home work u r looking for? :-(&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;do u have a script already built. if yes, pls post it. we can try to fix it.&lt;BR /&gt;&lt;BR /&gt;hth&lt;BR /&gt;-balaji</description>
    <pubDate>Tue, 22 Apr 2003 04:40:02 GMT</pubDate>
    <dc:creator>Balaji N</dc:creator>
    <dc:date>2003-04-22T04:40:02Z</dc:date>
    <item>
      <title>Bourne shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956015#M76928</link>
      <description>Do you know how to slove this script:&lt;BR /&gt;&lt;BR /&gt;write a Bourne shell that will allow a user to specify a number of files to be printed and which email the user with the results of the command. The script should email the user a list of the files that were sent to the printer as well as a list of the files that could not be sent to the printer.&lt;BR /&gt;&lt;BR /&gt;i tried to do this but wont work...please help...</description>
      <pubDate>Tue, 22 Apr 2003 03:57:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956015#M76928</guid>
      <dc:creator>Avery_1</dc:creator>
      <dc:date>2003-04-22T03:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956016#M76929</link>
      <description>Sophia,&lt;BR /&gt;&lt;BR /&gt;It would be good if you could post out your script so that we may debug it.&lt;BR /&gt;&lt;BR /&gt;- ramd.</description>
      <pubDate>Tue, 22 Apr 2003 04:21:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956016#M76929</guid>
      <dc:creator>Ramkumar Devanathan</dc:creator>
      <dc:date>2003-04-22T04:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956017#M76930</link>
      <description>if [ $# -eq 0 ]&lt;BR /&gt;then&lt;BR /&gt;echo "Usage:./printfile directory_name" 1&amp;gt;&amp;amp;2&lt;BR /&gt;exit 1&lt;BR /&gt;else &lt;BR /&gt;cd $1 ls ; (ls | wc -w)&lt;BR /&gt;echo "Number of files to be printed: " 1&amp;gt;&amp;amp;2&lt;BR /&gt;read fileNo&lt;BR /&gt;while [ !$fileNo ]&lt;BR /&gt;do&lt;BR /&gt;lpr -P[printer]&lt;BR /&gt;lpr -m logname&lt;BR /&gt;done&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;i dunno wat to do...quite embarassing to show my script actually</description>
      <pubDate>Tue, 22 Apr 2003 04:32:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956017#M76930</guid>
      <dc:creator>Avery_1</dc:creator>
      <dc:date>2003-04-22T04:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956018#M76931</link>
      <description>hi sophia,&lt;BR /&gt;is this some kind of a home work u r looking for? :-(&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;do u have a script already built. if yes, pls post it. we can try to fix it.&lt;BR /&gt;&lt;BR /&gt;hth&lt;BR /&gt;-balaji</description>
      <pubDate>Tue, 22 Apr 2003 04:40:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956018#M76931</guid>
      <dc:creator>Balaji N</dc:creator>
      <dc:date>2003-04-22T04:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956019#M76932</link>
      <description>Hi sophia,&lt;BR /&gt;&lt;BR /&gt;try this for checking if the lpr command returned successfully -&lt;BR /&gt;&lt;BR /&gt;res=`lpr -P &lt;PRINTER&gt; $docname`&lt;BR /&gt;if [[ $res -ne 0 ]]; then&lt;BR /&gt;  echo "error occured while printing $docname"&lt;BR /&gt;else&lt;BR /&gt;  echo "successfully printed $docname"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;HTH.&lt;BR /&gt;&lt;BR /&gt;- ramd.&lt;/PRINTER&gt;</description>
      <pubDate>Tue, 22 Apr 2003 04:44:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956019#M76932</guid>
      <dc:creator>Ramkumar Devanathan</dc:creator>
      <dc:date>2003-04-22T04:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956020#M76933</link>
      <description>Hi sophia,&lt;BR /&gt;&lt;BR /&gt;try this for checking if the lpr command returned successfully -&lt;BR /&gt;&lt;BR /&gt;res=`lpr -P &lt;PRINTER&gt; $docname`&lt;BR /&gt;if [[ $res -ne 0 ]]; then&lt;BR /&gt;  echo "error occured while printing $docname"&lt;BR /&gt;else&lt;BR /&gt;  echo "successfully printed $docname"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;HTH.&lt;BR /&gt;&lt;BR /&gt;- ramd.&lt;/PRINTER&gt;</description>
      <pubDate>Tue, 22 Apr 2003 04:45:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956020#M76933</guid>
      <dc:creator>Ramkumar Devanathan</dc:creator>
      <dc:date>2003-04-22T04:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956021#M76934</link>
      <description>Hi sophia,&lt;BR /&gt;&lt;BR /&gt;try this for checking if the lpr command returned successfully -&lt;BR /&gt;&lt;BR /&gt;res=`lpr -P &lt;PRINTER&gt; $docname`&lt;BR /&gt;if [[ $res -ne 0 ]]; then&lt;BR /&gt;  echo "error occured while printing $docname"&lt;BR /&gt;else&lt;BR /&gt;  echo "successfully printed $docname"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;HTH.&lt;BR /&gt;&lt;BR /&gt;- ramd.&lt;/PRINTER&gt;</description>
      <pubDate>Tue, 22 Apr 2003 04:46:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956021#M76934</guid>
      <dc:creator>Ramkumar Devanathan</dc:creator>
      <dc:date>2003-04-22T04:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956022#M76935</link>
      <description>Oops! That echoed!!!&lt;BR /&gt;&lt;BR /&gt;- ramd.</description>
      <pubDate>Tue, 22 Apr 2003 04:48:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956022#M76935</guid>
      <dc:creator>Ramkumar Devanathan</dc:creator>
      <dc:date>2003-04-22T04:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956023#M76936</link>
      <description>it says [: -ne:unary operator expected</description>
      <pubDate>Tue, 22 Apr 2003 05:16:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956023#M76936</guid>
      <dc:creator>Avery_1</dc:creator>
      <dc:date>2003-04-22T05:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956024#M76937</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;Try the attached script.&lt;BR /&gt;&lt;BR /&gt;call as ./sh.sh &lt;FILENAME&gt;&lt;BR /&gt;&lt;BR /&gt;ensure that execute permissions are available. if not, run&lt;BR /&gt;chmod +x sh.sh&lt;BR /&gt;&lt;BR /&gt;- ramd.&lt;/FILENAME&gt;</description>
      <pubDate>Tue, 22 Apr 2003 05:26:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956024#M76937</guid>
      <dc:creator>Ramkumar Devanathan</dc:creator>
      <dc:date>2003-04-22T05:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956025#M76938</link>
      <description>./sh.sh: Command not found.&lt;BR /&gt;&lt;BR /&gt;Type this:chmod +x sh.sh says&lt;BR /&gt;&lt;BR /&gt;chmod: getting attributes of `sh.sh' : No such file or directory</description>
      <pubDate>Tue, 22 Apr 2003 05:39:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956025#M76938</guid>
      <dc:creator>Avery_1</dc:creator>
      <dc:date>2003-04-22T05:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956026#M76939</link>
      <description>Sophia,&lt;BR /&gt;&lt;BR /&gt;I guess you are a newbie to shell programming and also working in unix.&lt;BR /&gt;&lt;BR /&gt;I suggest the following -&lt;BR /&gt;- learn to work in linux and how to use the shell - try to run small shell scripts - learn about absolute paths, relative paths, what './' and '../' say, refer to.&lt;BR /&gt;- read books on unix shell programming. you will find quite a few if you search in the www&lt;BR /&gt;- try out some easy programs which are given in the books above.&lt;BR /&gt;- all this will definitely help you to debug your problem.&lt;BR /&gt;&lt;BR /&gt;the script i've given is to be copied onto your machine, in a directory say /tmp.&lt;BR /&gt;&lt;BR /&gt;you may cd /tmp and then run as i'd suggested, or run it from your home directory as&lt;BR /&gt;$ /tmp/sh.sh&lt;BR /&gt;&lt;BR /&gt;here are a few links to linux tutorials -&lt;BR /&gt;&lt;BR /&gt;1. &lt;A href="http://www.tldp.org/LDP/abs/html/" target="_blank"&gt;http://www.tldp.org/LDP/abs/html/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;2. &lt;A href="http://steve-parker.org/sh/sh.shtml" target="_blank"&gt;http://steve-parker.org/sh/sh.shtml&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;3. &lt;A href="http://librenix.com/?inode=1774" target="_blank"&gt;http://librenix.com/?inode=1774&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;you can search at google with the keywords &lt;BR /&gt;&lt;BR /&gt;bash programming scripting tutorial&lt;BR /&gt;&lt;BR /&gt;HTH.&lt;BR /&gt;&lt;BR /&gt;- ramd.&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Apr 2003 06:04:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956026#M76939</guid>
      <dc:creator>Ramkumar Devanathan</dc:creator>
      <dc:date>2003-04-22T06:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956027#M76940</link>
      <description>yes i'm a newbie...thanks for ur help....really...</description>
      <pubDate>Tue, 22 Apr 2003 06:15:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/bourne-shell-script/m-p/2956027#M76940</guid>
      <dc:creator>Avery_1</dc:creator>
      <dc:date>2003-04-22T06:15:56Z</dc:date>
    </item>
  </channel>
</rss>

