Is it possible in Bash (or any other shell) to get a shell script to know it's own path without having to be part of $PATH or anything like that.
I need this cos i want the script to be able to rename the directory in which it resides.
is this possible? (6 Replies)
please send me format for wriiting classpath in shell script
this is my shell script
---------------
#! /bin/bash
javac File1.java
/usr/bin/java File1
--------------------------
the script works fine on termianal but in cron it gives me error saying class defination not found
... (1 Reply)
Hi,
I am new to shell scripting.I tried adding an entry to the path variable like below
export PATH=$PATH:/opt/xxx/bin
But am getting an error invalid identifier /opt/xxx/bin
Can someone tell me the error above and correct me .
Thanks and Regards,
Padmini (2 Replies)
Hello,
I want to add a port in the firewall exception list so that my application can be accessed over network even if firewall is disabled. I am using iptables command to add exception.
The problem is, after setting the rule if I change the firewall setting i.e. on/off then it is overwriting... (1 Reply)
Hello all,
Sorry if the question if stupid but I have no big experience with programming.
I am trying to set a path to be used in a makefile.in, for installation of a Fortran code. The makefile.in contains the string
$(CODE_NAME)
Now, when I type in the bash shell
export... (6 Replies)
Hi All,
I have made a file file usercreate.sh & it has to run in tcsh env & needs some path to be set.
my script is as below.
##########################
#!/bin/csh
setenv PATH "/usr/lib/java/class"
setenv LD_LIBRARAY_PATH
###########################
but when i am ruuning my script... (1 Reply)
The following is part of a larger shell script
grep -v "Col1" my_test.log | grep -v "-" | awk '$5 == "Y" {print $1}'
instead of printing, can I set set $1 to a variable that the rest of the shell script can read?
if $5 == Y, I want to call another shell script and pass $1 as a... (2 Replies)
Hello All.
Good Afternoon.
I need one small help regarding setting of env variables for a particular host by getting it from the DB.
For ex :
1. I am using LOCALHOST.
2. When I run a ./hostset.sh it should pick up the Oracle home details from associated DB and set it.
Please... (1 Reply)
I ssh in and am trying to add a directory permanently to $PATH in centos 7 and having issues. My current $PATH is
echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
but when I do a sudo nano ~/.bashrc
# .bashrc
# User specific aliases and functions
alias... (7 Replies)