<?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: How to make a bourne shell script executable? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825084#M825180</link>
    <description>Dear procura, i saw you reply on chmod 555 id.sh and chmod 111 id.sh. I will learn perl slowly but it takes some time. All i want is that:&lt;BR /&gt;when i convert abc.sh to executable, i can run it as usual by typing abc.sh.&lt;BR /&gt;But when i vi abc.sh, it will not display any codes but executable. Example if i vi a directory, it will tell me the file is a directory right. Thank you.</description>
    <pubDate>Mon, 14 Oct 2002 11:06:40 GMT</pubDate>
    <dc:creator>Chua Wen Ching</dc:creator>
    <dc:date>2002-10-14T11:06:40Z</dc:date>
    <item>
      <title>How to make a bourne shell script executable?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825076#M825172</link>
      <description>I had write some bourne shell scripts but i do not want to reveal the source code. Can i make the script executable? Can chmod do that? Thank you.</description>
      <pubDate>Mon, 14 Oct 2002 10:14:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825076#M825172</guid>
      <dc:creator>Chua Wen Ching</dc:creator>
      <dc:date>2002-10-14T10:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a bourne shell script executable?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825077#M825173</link>
      <description>chmod a+x&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Mon, 14 Oct 2002 10:21:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825077#M825173</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2002-10-14T10:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a bourne shell script executable?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825078#M825174</link>
      <description>Not possible. Setting the execute bit allows the program to be started as a potential process but in order for the shell to see that the file type is a shell script, it must be read. And of course, the shell script is an interpreted language so each line must be read by the shell. You can try: chmod 711 your-file which makes it executable only, but the shell cannot open the file.&lt;BR /&gt;&lt;BR /&gt;IMPORTANT: if you make a file unreadable for yourself (ie, chmod 111 your-file) then you can no longer read or edit the file. The root user will have to restore read privileges for you.</description>
      <pubDate>Mon, 14 Oct 2002 10:22:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825078#M825174</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2002-10-14T10:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a bourne shell script executable?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825079#M825175</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;For me a script must been have read right. I think that you can't make script executable and not readable.&lt;BR /&gt;A chmod 111 give this error :&lt;BR /&gt;sh: ./script: Cannot find or open the file.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Jerome</description>
      <pubDate>Mon, 14 Oct 2002 10:25:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825079#M825175</guid>
      <dc:creator>Jerome Baron</dc:creator>
      <dc:date>2002-10-14T10:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a bourne shell script executable?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825080#M825176</link>
      <description>Makes sense it would have to be readable - learned something new already today!&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Mon, 14 Oct 2002 10:26:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825080#M825176</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2002-10-14T10:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a bourne shell script executable?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825081#M825177</link>
      <description>Hmm...so it is impossible to make bourne shell script executable? Is there any third party utility to convert? Anyway thanks a lot.</description>
      <pubDate>Mon, 14 Oct 2002 10:34:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825081#M825177</guid>
      <dc:creator>Chua Wen Ching</dc:creator>
      <dc:date>2002-10-14T10:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a bourne shell script executable?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825082#M825178</link>
      <description>As long as you have write access to the containing folder, you can chmod +r the 111 file yourself IMHO. Don't need no root for that.&lt;BR /&gt;&lt;BR /&gt;$ id&lt;BR /&gt;uid=9999(guest) gid=999(common) groups=200(softwr),700(dba),703(oinstall)&lt;BR /&gt;$ which chmod&lt;BR /&gt;/usr/bin/chmod&lt;BR /&gt;$ ls -ld .&lt;BR /&gt;drwxrwxrwx  21 root       root         11264 Oct 14 13:42 .&lt;BR /&gt;$ echo id &amp;gt;id.sh&lt;BR /&gt;$ ./id.sh&lt;BR /&gt;sh: ./id.sh: Execute permission denied.&lt;BR /&gt;$ chmod 555 id.sh&lt;BR /&gt;$ ./id.sh&lt;BR /&gt;uid=9999(guest) gid=999(common) groups=200(softwr),700(dba),703(oinstall)&lt;BR /&gt;$ chmod 111 id.sh&lt;BR /&gt;$ ./id.sh&lt;BR /&gt;sh: ./id.sh: Cannot find or open the file.&lt;BR /&gt;$ chmod 555 id.sh&lt;BR /&gt;$ ./id.sh&lt;BR /&gt;uid=9999(guest) gid=999(common) groups=200(softwr),700(dba),703(oinstall)&lt;BR /&gt;$</description>
      <pubDate>Mon, 14 Oct 2002 10:39:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825082#M825178</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2002-10-14T10:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a bourne shell script executable?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825083#M825179</link>
      <description>&lt;BR /&gt;Chua Wen,&lt;BR /&gt;&lt;BR /&gt;That's why it's time to learn perl. You can convert perl to c, compile it and have an executable. Once you have a newer version of perl installed, check out perlcc.&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Mon, 14 Oct 2002 10:42:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825083#M825179</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-10-14T10:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a bourne shell script executable?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825084#M825180</link>
      <description>Dear procura, i saw you reply on chmod 555 id.sh and chmod 111 id.sh. I will learn perl slowly but it takes some time. All i want is that:&lt;BR /&gt;when i convert abc.sh to executable, i can run it as usual by typing abc.sh.&lt;BR /&gt;But when i vi abc.sh, it will not display any codes but executable. Example if i vi a directory, it will tell me the file is a directory right. Thank you.</description>
      <pubDate>Mon, 14 Oct 2002 11:06:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825084#M825180</guid>
      <dc:creator>Chua Wen Ching</dc:creator>
      <dc:date>2002-10-14T11:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a bourne shell script executable?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825085#M825181</link>
      <description>WHY do you want to make it compilable? Even perlcc will not help you, because there are perfectly working de-parsers (of course available in perl modules :)&lt;BR /&gt;&lt;BR /&gt;If you /need/ to hide the source code (for whatever valid reason), you're bound to compiling languages like C, Pascal, Ada, or Fortran.&lt;BR /&gt;&lt;BR /&gt;Perl has the huge advantage, that it's scripts run almost anywhere (given that the perl installed on the target system is new enough to support the features used in the script). Most - if not all - perl4 scripts will still run under perl-5.8.0 as well on HP-UX 09.00 as on M$Win32 (as long as you're not depending on fork's alarms and other timer/signal stuff) and MacOS-X. The fact that the source is `readable', does not mean that you loose copyright. It's *your* source. Make it stand out in the headers, and make good contracts that verify the use of your scripts.</description>
      <pubDate>Mon, 14 Oct 2002 11:07:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825085#M825181</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2002-10-14T11:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a bourne shell script executable?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825086#M825182</link>
      <description>It sounds complicated here. Any solutions using bourne shell other than perl? Thank you. :D</description>
      <pubDate>Mon, 14 Oct 2002 11:11:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825086#M825182</guid>
      <dc:creator>Chua Wen Ching</dc:creator>
      <dc:date>2002-10-14T11:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a bourne shell script executable?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825087#M825183</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;please have a look at &lt;A href="http://www.cactus.com/products/cactus/shell-lock.html" target="_blank"&gt;http://www.cactus.com/products/cactus/shell-lock.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Quote:&lt;BR /&gt;==============================&lt;BR /&gt;SHELL-LOCK(tm) is a shell script compiler which actually turns your shell scripts into binary executable files so that they can not be modified or tampered with by your customer or competitor. In addition, we offer special Code Shells which allow you to compile your shell scripts for platforms other than the one you write scripts on.&lt;BR /&gt;==============================&lt;BR /&gt;&lt;BR /&gt;Hope this is what you are looking for. There are a few other products like this...&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Yogeeraj&lt;BR /&gt;</description>
      <pubDate>Mon, 14 Oct 2002 11:14:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825087#M825183</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2002-10-14T11:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a bourne shell script executable?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825088#M825184</link>
      <description>I will try the third party software. Is it possible to write a bourne shell script which act to convert the source code to executable? :D</description>
      <pubDate>Mon, 14 Oct 2002 11:51:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825088#M825184</guid>
      <dc:creator>Chua Wen Ching</dc:creator>
      <dc:date>2002-10-14T11:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a bourne shell script executable?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825089#M825185</link>
      <description>Just an idea ...&lt;BR /&gt;&lt;BR /&gt;Why not write a simple c program :&lt;BR /&gt;&lt;BR /&gt;Put your script as text in a pointer,&lt;BR /&gt;Copy your pointer in a temporary file,&lt;BR /&gt;Execute system(temporary file),&lt;BR /&gt;Delete temporary file.&lt;BR /&gt;&lt;BR /&gt;You could slice your script in several pointers, if the&lt;BR /&gt;execution time is long enough to allow somebody&lt;BR /&gt;find your  temporary file.&lt;BR /&gt;&lt;BR /&gt;Gerard</description>
      <pubDate>Tue, 15 Oct 2002 05:36:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825089#M825185</guid>
      <dc:creator>Gerard Leclercq</dc:creator>
      <dc:date>2002-10-15T05:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a bourne shell script executable?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825090#M825186</link>
      <description>I am not that good in c programming. Is there any sample c program which can do that? I hope bourne shell script also can do that. Thank you.</description>
      <pubDate>Tue, 15 Oct 2002 09:55:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825090#M825186</guid>
      <dc:creator>Chua Wen Ching</dc:creator>
      <dc:date>2002-10-15T09:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a bourne shell script executable?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825091#M825187</link>
      <description>hi,&lt;BR /&gt;The first C program, you would write:&lt;BR /&gt;=============================&lt;BR /&gt;SLX1:tmp&amp;gt;vi first.c&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;void main(void)&lt;BR /&gt;{&lt;BR /&gt;printf("\nhello world \n");&lt;BR /&gt;}&lt;BR /&gt;~&lt;BR /&gt;"first.c" 5 lines, 67 characters&lt;BR /&gt;SLX1:tmp&amp;gt;cc first.c -o first&lt;BR /&gt;SLX1:tmp&amp;gt;./first&lt;BR /&gt;&lt;BR /&gt;hello world&lt;BR /&gt;SLX1:tmp&amp;gt;&lt;BR /&gt;==============================&lt;BR /&gt;&lt;BR /&gt;for more complex programs, you should start opening C books ;)&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;Yogeeraj&lt;/STDIO.H&gt;</description>
      <pubDate>Tue, 15 Oct 2002 11:23:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825091#M825187</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2002-10-15T11:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a bourne shell script executable?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825092#M825188</link>
      <description>Chua Wen,&lt;BR /&gt;&lt;BR /&gt;TO make a perl program executable you do this:&lt;BR /&gt;&lt;BR /&gt;(1) Write the perl program&lt;BR /&gt;(2) test it to make sure it works&lt;BR /&gt;(3) perlcc -o perlprogramname executablename&lt;BR /&gt;(4) test "executablename" &lt;BR /&gt;&lt;BR /&gt;Now, that's easy!&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Tue, 15 Oct 2002 11:43:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825092#M825188</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-10-15T11:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a bourne shell script executable?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825093#M825189</link>
      <description>I am not a good c programmer, please professionals of c programming, do not read what follows ...&lt;BR /&gt;&lt;BR /&gt;Dear Chua Wen Ching,&lt;BR /&gt;&lt;BR /&gt;Please try this :&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;STDLIB.H&gt;&lt;BR /&gt;#include &lt;STRING.H&gt;&lt;BR /&gt;&lt;BR /&gt;main(argc, argv)&lt;BR /&gt;int argc;&lt;BR /&gt;char *argv[];&lt;BR /&gt;  {&lt;BR /&gt;  FILE *fildes;&lt;BR /&gt;&lt;BR /&gt;  fildes = fopen(".fich_tmp", "wt");&lt;BR /&gt;&lt;BR /&gt;  fprintf(fildes, "echo compiled script test\n");&lt;BR /&gt;  fprintf(fildes, "ll\n");&lt;BR /&gt;&lt;BR /&gt;  fclose(fildes);&lt;BR /&gt;&lt;BR /&gt;  system("sh .fich_tmp;rm .fich_tmp");&lt;BR /&gt;&lt;BR /&gt;  }&lt;BR /&gt;&lt;BR /&gt;The dot before fich_tmp makes it harder (just a little bit) for somebody else to see the file.&lt;BR /&gt;&lt;BR /&gt;Gerard&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STRING.H&gt;&lt;/STDLIB.H&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Tue, 15 Oct 2002 12:24:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825093#M825189</guid>
      <dc:creator>Gerard Leclercq</dc:creator>
      <dc:date>2002-10-15T12:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a bourne shell script executable?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825094#M825190</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.cs.utah.edu/" target="_blank"&gt;http://hpux.cs.utah.edu/&lt;/A&gt;&lt;BR /&gt;has source code and hpux binaries for "shc" a shell compiler that is free.  The last time I used it it worked fine.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 15 Oct 2002 14:19:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825094#M825190</guid>
      <dc:creator>Rory R Hammond</dc:creator>
      <dc:date>2002-10-15T14:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a bourne shell script executable?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825095#M825191</link>
      <description>Simple C-solutions like posted above won't help you obfuscating your source from peering eyes of people with experience.&lt;BR /&gt;&lt;BR /&gt;# strings blah&lt;BR /&gt;&lt;BR /&gt;(given that blah is the executable) will probably show you the complete script in the correct order.&lt;BR /&gt;&lt;BR /&gt;So *if* you go for a solution like this, insert fake statements in the C program:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;printf ("real statement\n");&lt;BR /&gt;if (0) printf ("rm -rf /\n");&lt;BR /&gt;printf ("another real statement\n");&lt;BR /&gt;strcpy (a, "exit 1\nyet another real statement\n");&lt;BR /&gt;printf ("%s", a + 7);&lt;BR /&gt;</description>
      <pubDate>Tue, 15 Oct 2002 14:29:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-a-bourne-shell-script-executable/m-p/2825095#M825191</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2002-10-15T14:29:16Z</dc:date>
    </item>
  </channel>
</rss>

