Sponsored Content
Top Forums Shell Programming and Scripting How do i execute script in the current shell Post 302076354 by Naresh Kumar on Monday 12th of June 2006 11:41:20 AM
Old 06-12-2006
I tried but i am getting the following error

/bin/.: Permission denied.

What is that period means what i have to do to get permission.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how do i get current bandwidth usage via shell script?

hello unix-people. can u please tell me how i can get the current bandwidth usage of my machine on shell into variables? thanks a lot (2 Replies)
Discussion started by: scarfake
2 Replies

2. Shell Programming and Scripting

current line number in shell script

Hi I am using korn shell is there a built in or ny other way to get the current line number so i can write the current line number to the logfile to aid in debugging like logmsg $lineno $date logmsg is a helper function that helps in logging messages to a log file regards (3 Replies)
Discussion started by: xiamin
3 Replies

3. Shell Programming and Scripting

Execute unix shell script to text file using the script

Hi all, I am beginner in UNIX...I want to use unix shell script to create text.file...I know how to use using by command...can anybody tell me for the script? Thanks i changed the threads title from "tex file" to "text file", because "tex" would probably be misunderstood as reference to... (4 Replies)
Discussion started by: mastercar
4 Replies

4. Shell Programming and Scripting

Execute commands from script in current bash session

I have a file as follows: cat /etc/mxg/ssh-hostsmx.example1.com.au:2225 mx2.example2.com.au:2225 mx.example3.com.au:2225 mail.example4.com.au:2225 mail.example5.org.au:2225 mail.example6.com.au:2225I want to dynamically create aliases for quick access to these servers from bash. I wrote... (4 Replies)
Discussion started by: jelloir
4 Replies

5. Shell Programming and Scripting

How to use ssh execute other shell script on other host (shell script include nohup)?

i want use ssh on the host01 to execute autoexec.sh on the host02 like following : host01> ssh host02 autoexec.sh autoexec.sh include nohup command like follwing : nohup /home/jack/deletedata.sh & after i execute ssh host02 autoexec.sh one the host01. i can't found deletedata.sh... (1 Reply)
Discussion started by: orablue
1 Replies

6. Shell Programming and Scripting

Dos batch script to execute unix shell script

Can anyone help me with a dos batch script to execute a shell script residing in an unix server. I am not able to use ssh. Thanks in advance (2 Replies)
Discussion started by: Shri123
2 Replies

7. Shell Programming and Scripting

Execute C program in Current shell

Hello, I have a c program executable which I need to run inside a shell script. But the c program runs in a subshell because of which all the actions done by the c program is not available to the current shell. Is there any way to execute a C program binary executable in the current shell? (4 Replies)
Discussion started by: sachinverma
4 Replies

8. Shell Programming and Scripting

Batch script to execute shell script in UNIX server

Hi team, My requirement is to transfer pdf files from windows machine to unix server and then from that unix server we should sftp to another server. I have completed the first part i.e From windows to using to unix server with the help of psftp.exe code: psftp user@host -pw password <... (1 Reply)
Discussion started by: bhupeshchavan
1 Replies

9. Shell Programming and Scripting

Finish current script and execute next script

Hi, I've come accross a situation where I need to exit from current shell script at the same time I need to start/activate another shell script. How can I do that in KSH ?? Need help !! For example, my script is as below #!/bin/ksh paramFile="/home/someXfile.lst" ] && <<Here I... (1 Reply)
Discussion started by: R0H0N
1 Replies

10. Shell Programming and Scripting

Detect current shell inside a script

I wish to print my current shell which happens to be bash in my script check.sh more check.sh echo $0 echo `ps -p $$` But instead of printing it prints check.sh i.e the name of the script for both the commands. Can you please suggest how to print the current shell i m on inside the... (2 Replies)
Discussion started by: mohtashims
2 Replies
access(2)							System Calls Manual							 access(2)

NAME
access - Determines the accessibility of a file SYNOPSIS
#include <unistd.h> int access ( const char *path, int access_mode) ; STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: access(): XPG4, XPG4-UNIX Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Points to the file pathname. When the path parameter refers to a symbolic link, the access() function returns information about the file pointed to by the symbolic link. Permission to access all components of the path parameter is determined by using a real user ID instead of an effective user ID, and a group access list (including a real group ID) instead of an effective group ID. Specifies the type of access. The bit pattern contained in the access_mode parameter is constructed by a logical OR of the following values: Checks read permission. Checks write permission. Checks execute (search) permission. Checks to see if the file exists. DESCRIPTION
The access() function checks for accessibility of the file specified by a pathname. Only access bits are checked. A directory may be indicated as writable by access(), but an attempt to open it for writing will fail (although files may be created there); a file's access bits may indicate that it is executable, but the execve() function can fail if the file does not contain the proper format. RETURN VALUES
Upon successful completion, the access() function returns value of 0 (zero). Otherwise, a value of -1 is returned and errno is set to indicate the error. ERRORS
If the access() function fails, access to the file specified by the path parameter is denied and errno may be set to one of the following values: Permission bits of the file mode do not permit the requested access, or search permission is denied on a component of the path pre- fix. The owner of a file has permission checked with respect to the ``owner'' read, write, and execute mode bits, members of the file's group other than the owner have permission checked with respect to the ``group'' mode bits, and all others have permissions checked with respect to the ``other'' mode bits. The path parameter points outside the process' allocated address space. The pathname contains a char- acter with the high-order bit set. An I/O error occurred while reading from or writing to the file system. Too many symbolic links were encountered in translating the pathname. A component of a pathname exceeded PATH_MAX characters, or an entire pathname exceeded NAME_MAX characters. The named file does not exist or is an empty string. A component of the path prefix is not a directory. Write access is requested for a file on a read-only file system. RELATED INFORMATION
Functions: chmod(2), stat(2) Standards: standards(5) delim off access(2)
All times are GMT -4. The time now is 04:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy