Perhaps you think that your script checks your current shell. That is not the case.
The script is run by a new shell and reports on that shell.
If you run the script with its scriptname then it reports on the shell given in the #! shebang.
If you run the script with bash scriptname it finds bash.
If you run the script with ksh scriptname it finds ksh.
To report on the current (calling) shell the only solution is to include/source it:
I have been “commissioned” to write a shellscript to automate Oracle cold refeshes.. right now we perform about 20 refresh each 300gb in size which takes up our time. my goal is to write a shellscript which can be executed by a user on serverA to refresh any of the 7 databases on ServerA. I am... (4 Replies)
Hi guys,
I am facing issues while triggering sqlplus with "/" option
I can connect to database with USER ID and password. but, if i just specify "/" option since it is "externally identiifed user" it doesn't work
Any suggestions?
mail me @ Removed.
Regards, Giri (2 Replies)
I have 3 shell scripts below.... I need to write a command line parser
for these 3 utilities.
basically the parser will accept ANY number of commands in this syntax
-r = right -f = findtext -c = count so you do something like
mu.s -r 3 4 5 -f hello goodbye.txt -c *.c -h 5 4 3
right... (5 Replies)
To find all the files in your home directory that have been edited in some way since the last tar file, use this command:
find . -newer backup.tar.gz
Is anyone familiar with an older solution?
looking to identify files older then 15mins across several directories.
thanks,
manny (2 Replies)
Hi ,
I'm a beginner in unix shell scripting need help in rectifying an error
Source file :test.txt with
Header
------
-----
Trailer
ex:
FH201010250030170000000000000000
abc def jke
abr ded etf
FE2
I was validating whether the header begin... (2 Replies)
#!/bin/sh
for ip in $(cat /root/Desktop/ftp.txt)
do
HOST=$ip
USER='bob'
PASS='bob'
ftp -n $HOST <<EOF
user bob bob
EOF
echo "$ip"
done
the Above code i want to use check and verify login works on multiple ftp servers on my network. However the ftp servers are dynamic in setup... (5 Replies)
I have an xml file where every line which has the word CDATA in it follows this pattern
(line number) <word1><!]></>I need only these lines editing so that the end result is that
(line number) <word1><!]></word1>so it copies the first bit to the end.
Anyone know how I can do this I am... (10 Replies)
Hi All,
I have run the below script but getting one small error. please help me to solve this.
ERROR:
tar: Error exit delayed from previous errors
CODE:
#! /bin/bash
CEP=/home/user01/exercise/CEP
ARCH=/home/user01/exercise/archive
LOG=/home/user01/exercise/logs... (3 Replies)