Sponsored Content
Top Forums Shell Programming and Scripting How can I get the directory of my executing script? Post 302383070 by JamesByars on Monday 28th of December 2009 08:55:07 AM
Old 12-28-2009
pwd gives the location of where I am executing the script from.

My users can execute it from anywhere, so I cant force them to put the absolute path

thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

general question on executing file in drwx--x--x directory

suppose: nevermind, i figured it out, haha... (2 Replies)
Discussion started by: cul8erppl
2 Replies

2. Shell Programming and Scripting

Monitoring a directory for new files with .xx and executing command if found

Hi Guys. I am a complete shell scripting newbie with some syntax and commands understanding. I'm more of a win admin. With that said: I need to write a shell script to monitor a directory '/Mon_Dir' for new occurrences of files with .xx extension. Once a new file is detected in the directory, a... (4 Replies)
Discussion started by: krkan
4 Replies

3. Shell Programming and Scripting

Executing script's directory

I have a shell script /home/user1/bin/sh1, how can I print out the directory of this file inside the script. Say I am in /home/user1/, then I run /home/user1/bin/sh1 I need it to print out /home/user1/bin. Thanks. (2 Replies)
Discussion started by: jasony001
2 Replies

4. Shell Programming and Scripting

getting : No such file or directory while executing a shell script

Hi all, I am getting : No such file or directory while executing a shell script. But i have that corresponding file in the corresponding path. It also have executable rights. Please help me out in this Thanks in advance. Ananthi.U (7 Replies)
Discussion started by: ananthi_ku
7 Replies

5. UNIX for Advanced & Expert Users

Executing a shell script from windows;script present in unix

I need to execute a shell script kept in unix machine from windows. User id, password area available. For eg. There's a shell script wich moves all the logs kept in my home directory to a directory named LOGS. Now i need to get this done through windows; either using a batch file, or java... (4 Replies)
Discussion started by: rajneesh_kapoor
4 Replies

6. Shell Programming and Scripting

CD (change directory) - Not advisable for executing a command

Hi, This is a quick one. I have got a review comment in one of the scripts that i wrote: "In UNIX script it not advisable to use cd to a directory and then run command." Is this true? I was trying to cd to log directory and use some cat or head or ls command. Many Thanks, Sam (2 Replies)
Discussion started by: samplify
2 Replies

7. Shell Programming and Scripting

Variables of executed script available in executing script

Hi, I have a script get_DB_var.ksh which do a data base call and get some variables as below: sqlplus -silent $user/$pass@dbname <<END select col1, col2, col3 from table_name where col4=$1; exit; END Now I want to access all these variables i.e.... (9 Replies)
Discussion started by: dips_ag
9 Replies

8. UNIX for Dummies Questions & Answers

Executing profile from any directory other than $HOME

Is there a way to run the profile which is not in $HOME directory? then whats the command for that? (1 Reply)
Discussion started by: SKhan
1 Replies

9. UNIX for Dummies Questions & Answers

Script dosent exits after executing the script

Hi i wrote a script which dosent exists after executing any help #!/bin/bash netstat -ptlen | grep 10000 if ; then echo "Hive Thrift server is running" exit 0 else echo "Hive Thrift server is down Trying to Bring up the service" | mail -s "ALERT" team@domain.com `nohup hive... (7 Replies)
Discussion started by: vikatakavi
7 Replies

10. Shell Programming and Scripting

Executing a command line in a directory and its subdirectories

I'm finally about to make the jump from PHP's mysql driver to the newer mysqli one using the mysqli converter tool. The tool is called by this command line: php /usr/share/nginx/html/rather/converter/cli.php -d -p ".php,.shtml,.inc" -u -b -v -w >> /tmp/convert.log e.g. at the web root:... (2 Replies)
Discussion started by: dheian
2 Replies
LDAP2TINYDNS-CONF(1)					      General Commands Manual					      LDAP2TINYDNS-CONF(1)

NAME
ldap2tinydns-conf - part of the ldap2dns DNS management system SYNOPSIS
ldap2tinydns-conf DESCRIPTION
This manual page documents briefly the ldap2tinydns-conf command. This manual page was written for the Debian GNU/Linux distribution because the original program does not have a manual page yet. ldap2tinydns-conf is a shell script to help configure ldap2dns for use with tinydns. This script wil add the directory structure and files required to run ldap2dns under daemontools. Run this script within your tinydns directory. For example: root@host[/var/tinydns]# ldap2tinydns-conf This creates the ldap2tinydns directory under your tinydns directory and adds the default configuration under ldap2tinydns/env. OPTIONS
This shell script does not take any commanline options. SEE ALSO
tinydns, ldap2dns(1). Please visit the project homepage for more detail: [http://ldap2dns.tiscover.com/] AUTHOR
This manual page was written by Johann Botha <joe@blio.net>, for the Debian GNU/Linux system and is distributed under the GPL version 2 or later. Jacob Rief <jacob.rief@tiscover.com> is the original author of this program.. June 7, 2001 LDAP2TINYDNS-CONF(1)
All times are GMT -4. The time now is 09:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy