Sponsored Content
Top Forums UNIX for Advanced & Expert Users Running scripts without a hashbang - ksh anomaly? Post 302911162 by DGPickett on Wednesday 30th of July 2014 12:08:08 PM
Old 07-30-2014
The man page for the execvp() call tells what happend to scripts without a #!. They go to sh stdin usually. Permissions bits have no effect on the process except it must not be no read.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

executing variables in ksh scripts?

In a ksh script on an AIX box running a jillion oracle database processes, I'm setting a variable to one of two possible arguments, depending on cmd line arguments. FINDIT="ps -ef | grep oracle | grep DBexport | grep rshrc" -or- FINDIT="ps -ef | grep oracle | grep prod | grep runback" I... (3 Replies)
Discussion started by: zedmelon
3 Replies

2. Shell Programming and Scripting

converting ksh scripts to sh

Hello All, I have a whole bunch of shell scripts written in a ksh environment and which successfully execute there. However, I found out that they eventually need to be used in a sh environment. So some commands like some_variable=$(some_command) fail because sh doesn't understand $(.....). I... (11 Replies)
Discussion started by: sherkaner
11 Replies

3. Shell Programming and Scripting

Running scripts via su

Hi All, Am using the below command to start my application using the root user su - bin -c "/home/bin/test/start.sh" but am getting the error becaue i have set some environment varibales in bin .profile when i execute the command start.sh by logging directly into bin account it's... (8 Replies)
Discussion started by: ravi.sri24
8 Replies

4. Shell Programming and Scripting

Running scripts within scripts from cron

Hi all, I have set up a cron job which calls another shell script shell script which in turn calls a Java process. The cron tab looks so. 0,30 7-18 * * 1-5 /u01/home/weblogic/brp/bin/checkstatus.sh >> /u01/home/weblogic/logs/checkstatus.log The checkstatus.sh scripts looks like this. ... (4 Replies)
Discussion started by: sirbrian
4 Replies

5. Shell Programming and Scripting

Ksh Associating scripts

Im writing a script in the Ksh, as the title suggests. OK so im sincerely tring to be lazy. Im trying to make a script that will use another file as a sort of variable library So basically i dont need to include the variables themselves, just want to make a reference to the file, so the... (2 Replies)
Discussion started by: Demon002
2 Replies

6. Shell Programming and Scripting

KSH script to run other ksh scripts and output it to a file and/or email

Hi I am new to this Scripting process and would like to know How can i write a ksh script that will call other ksh scripts and write the output to a file and/or email. For example ------- Script ABC ------- a.ksh b.ksh c.ksh I need to call all three scripts execute them and... (2 Replies)
Discussion started by: pacifican
2 Replies

7. Shell Programming and Scripting

hashbang line

Hi All, I am new to this forum. I would really appreciate if some one from you expert team could answer my qns: 1) whats the difference between the below commands. what events occur in the background when I fire each of the three commands. >./script.ksh >sh script.ksh >script.ksh ... (11 Replies)
Discussion started by: agrawal.prachi
11 Replies

8. Shell Programming and Scripting

KSH - How to call different scripts from master scripts based on a column in an Oracle table

Dear Members, I have a table REQUESTS in Oracle which has an attribute REQUEST_ACTION. The entries in REQUEST_ACTION are like, ME, MD, ND, NE etc. I would like to create a script which will will call other scripts based on the request action. Can we directly read from the REQUEST_ACTION... (2 Replies)
Discussion started by: Yoodit
2 Replies

9. Shell Programming and Scripting

Restrict access to .ksh scripts

Hi, How to restrict access to a .ksh script in such the way that the users can only execute the script, neither read nor write. I tried the below code so that my user alone has the rwx and other users can only execute. chmod 711 sample.ksh But when I logged in as a different user... (26 Replies)
Discussion started by: machomaddy
26 Replies
IOPERM(2)						     Linux Programmer's Manual							 IOPERM(2)

NAME
ioperm - set port input/output permissions SYNOPSIS
#include <sys/io.h> /* for glibc */ int ioperm(unsigned long from, unsigned long num, int turn_on); DESCRIPTION
ioperm() sets the port access permission bits for the calling thread for num bits starting from port address from. If turn_on is nonzero, then permission for the specified bits is enabled; otherwise it is disabled. If turn_on is nonzero, the calling thread must be privileged (CAP_SYS_RAWIO). Before Linux 2.6.8, only the first 0x3ff I/O ports could be specified in this manner. For more ports, the iopl(2) system call had to be used (with a level argument of 3). Since Linux 2.6.8, 65,536 I/O ports can be specified. Permissions are inherited by the child created by fork(2) (but see NOTES). Permissions are preserved across execve(2); this is useful for giving port access permissions to unprivileged programs. This call is mostly for the i386 architecture. On many other architectures it does not exist or will always return an error. RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set appropriately. ERRORS
EINVAL Invalid values for from or num. EIO (on PowerPC) This call is not supported. ENOMEM Out of memory. EPERM The calling thread has insufficient privilege. CONFORMING TO
ioperm() is Linux-specific and should not be used in programs intended to be portable. NOTES
The /proc/ioports file shows the I/O ports that are currently allocated on the system. Before Linux 2.4, permissions were not inherited by a child created by fork(2). Glibc has an ioperm() prototype both in <sys/io.h> and in <sys/perm.h>. Avoid the latter, it is available on i386 only. SEE ALSO
iopl(2), outb(2), capabilities(7) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. Linux 2017-09-15 IOPERM(2)
All times are GMT -4. The time now is 08:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy