Sponsored Content
Top Forums Shell Programming and Scripting csh failing to call an 2 embedded csh script Post 302203275 by pollsizer on Saturday 7th of June 2008 01:22:28 PM
Old 06-07-2008
Update:

So, it turns out that the executable that was failing is a symbolic link to the real executable located on another disk on our cluster. This symbolic link and the real exe still had full read,write and exec permissions so I'm not sure why this didn't work.

However, end of story - copying the exe to the disk that I was calling it from fixes the problem.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Calling C from within a csh script

After I compile a C program, when I run it from a C shell script, it does not print out the results. e.g: myCFile.c: main(){printf("Hey");} myCshScript: myCFile This does not output "Hey" to the terminal window. I am not even sure if it is executed or not. What should I do to see the... (2 Replies)
Discussion started by: barisgultekin
2 Replies

2. Shell Programming and Scripting

how to call awk in a csh Program

Hi Friends, Could you pleas help me out.. I have an awk program which works fine while running it in the command prompt. The awk program is =============== awk 'BEGIN { format="head -%d M2_Sales_N01.txt |tail -%d >M2_Sales_N01_%02d.txt\n" n=0 m=0 } { if (n==0) { tmp=$1 n=1 }... (5 Replies)
Discussion started by: bikas_jena
5 Replies

3. Shell Programming and Scripting

Problem with csh script

Hi All, I have the following script. #!/bin/csh # # createDATfile.sh # cd /export/home/fastserv/bin source /export/home/fastserv/bin/dbenv.sh echo `date` >> /export/home/fastserv/bin/log.txt echo "%INF% Starting send of current FASTSERVICE batch" >>... (4 Replies)
Discussion started by: rahulrathod
4 Replies

4. Shell Programming and Scripting

Simple CSH script

Hi everyone, I have never wrote script in csh before, but I need to add only few lines to an existing one. I tried to use the bash standard syntax, and it did not work. So, I attempted to use csh syntax, and it is not working. Can someone help please: switch ( $Return_Code ) case 0:... (3 Replies)
Discussion started by: nimo
3 Replies

5. Shell Programming and Scripting

simple csh script

Hi This little script is giving me error: Syntax error at line xxx : `(' is not expected. Wgat did I miss? RC=0 switch ( $RC ) case 0: echo Done breaksw case -1: echo not done breaksw default: echo "Hello" endsw (2 Replies)
Discussion started by: nimo
2 Replies

6. Shell Programming and Scripting

Help with csh script

Ok I asked something similar earlier with no response, so maybe I didn't word it correctly. I'm new at this, so thank you for your help. Here's what I have right now. ---------------------------- > cat MySourceFile #!/bin/csh echo "Please Enter Value For My_Env_Var:" set answer = $< ... (1 Reply)
Discussion started by: MMorrison
1 Replies

7. Shell Programming and Scripting

csh script help

Hey I am brand new to this forum and scripting. I have several documents (1000+) all formated exactly the same. Each document contains 97 lines. I want to pull 3 lines from the documents to populate a file. These 3 lines are line number 9, 24, and 58. Ok my questions: Instead of using... (3 Replies)
Discussion started by: david6789
3 Replies

8. UNIX for Dummies Questions & Answers

Csh script

Hey all, I've only just started using UNIX coding on my Masters project, so am still learning!! The script I've been writing is literally just for me to get used to writing it and seeing what I can do with some data I've been given. I'm trying to write a script, where the penultimate line... (2 Replies)
Discussion started by: southernlight
2 Replies

9. Shell Programming and Scripting

Understanding someone else's csh script...

Hello all. I suspect this will be a simple case for an experienced csh scripter, but google is getting me nowhere on this one. I'm trying to get someone else's set of scripts to work for me, and it's choking when the following script gets called: #! /bin/csh if (x$1 == x) then echo ' you... (1 Reply)
Discussion started by: EinsteinMcfly
1 Replies

10. Programming

Csh script and tcl

I have csh script and call tck command but it do nothing. can you help me? I only can see it echo #!/bin/csh -f set mypath = `pwd` echo $mypath if ($mypath =~ *PLL*) then echo "source ../PreBoot.qel" else if ($mypath !~ *PLL*) then echo "source ../hdfuse.qel" endif if i remove... (1 Reply)
Discussion started by: sabercats
1 Replies
ACCESS(2)						     Linux Programmer's Manual							 ACCESS(2)

NAME
access - check user's permissions for a file SYNOPSIS
#include <unistd.h> int access(const char *pathname, int mode); DESCRIPTION
access checks whether the process would be allowed to read, write or test for existence of the file (or other file system object) whose name is pathname. If pathname is a symbolic link permissions of the file referred to by this symbolic link are tested. mode is a mask consisting of one or more of R_OK, W_OK, X_OK and F_OK. R_OK, W_OK and X_OK request checking whether the file exists and has read, write and execute permissions, respectively. F_OK just requests checking for the existence of the file. The tests depend on the permissions of the directories occurring in the path to the file, as given in pathname, and on the permissions of directories and files referred to by symbolic links encountered on the way. The check is done with the process's real uid and gid, rather than with the effective ids as is done when actually attempting an operation. This is to allow set-UID programs to easily determine the invoking user's authority. Only access bits are checked, not the file type or contents. Therefore, if a directory is found to be "writable," it probably means that files can be created in the directory, and not that the directory can be written as a file. Similarly, a DOS file may be found to be "exe- cutable," but the execve(2) call will still fail. If the process has appropriate privileges, an implementation may indicate success for X_OK even if none of the execute file permission bits are set. RETURN VALUE
On success (all requested permissions granted), zero is returned. On error (at least one bit in mode asked for a permission that is denied, or some other error occurred), -1 is returned, and errno is set appropriately. ERRORS
access shall fail if: EACCES The requested access would be denied to the file or search permission is denied to one of the directories in pathname. ELOOP Too many symbolic links were encountered in resolving pathname. ENAMETOOLONG pathname is too long. ENOENT A directory component in pathname would have been accessible but does not exist or was a dangling symbolic link. ENOTDIR A component used as a directory in pathname is not, in fact, a directory. EROFS Write permission was requested for a file on a read-only filesystem. access may fail if: EFAULT pathname points outside your accessible address space. EINVAL mode was incorrectly specified. EIO An I/O error occurred. ENOMEM Insufficient kernel memory was available. ETXTBSY Write access was requested to an executable which is being executed. RESTRICTIONS
access returns an error if any of the access types in the requested call fails, even if other types might be successful. access may not work correctly on NFS file systems with UID mapping enabled, because UID mapping is done on the server and hidden from the client, which checks permissions. Using access to check if a user is authorized to e.g. open a file before actually doing so using open(2) creates a security hole, because the user might exploit the short time interval between checking and opening the file to manipulate it. CONFORMING TO
SVID, AT&T, POSIX, X/OPEN, BSD 4.3 SEE ALSO
stat(2), open(2), chmod(2), chown(2), setuid(2), setgid(2) Linux 2002-04-23 ACCESS(2)
All times are GMT -4. The time now is 07:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy