10 More Discussions You Might Find Interesting
1. Red Hat
Hello,
My AIM is to run my script every time when someone shutdown or reboot my RHEL7 AWS instance.
Query ) Where should i put my script .So, that it gets automatically executed when a server is going down or reboot ? (3 Replies)
Discussion started by: saurabh84g
3 Replies
2. Shell Programming and Scripting
Hi All,
Suppose I have a script and inside it I want/need to put it into background. I need the script to not react to SIGHUP signals.
I tried:
#!/bin/bash
echo "" > test_disown
mypid=$$
echo "PID=$mypid"
(
kill -SIGSTOP $mypid
jobs > myjobs
#disown -h <job-spec>
#kill -SIGCONT $mypid
)... (6 Replies)
Discussion started by: JackK
6 Replies
3. Shell Programming and Scripting
Hi all
I want to put this script on start-up the sh Terminal to save history of output:
if ; then
logdir=$HOME/terminal-logs
if ; then
mkdir $logdir
fi
gzip -q $logdir/*.log
logfile=$logdir/$(date +%F_%T).$$.log
... (12 Replies)
Discussion started by: Rahim_T
12 Replies
4. UNIX for Dummies Questions & Answers
hi, ok having here some code like:
#!/bin/bash
echo " hello " # say hello to the user
echo " $HOME "
echo " $HOSTNAME "
echo " $(uname) "
echo " today is $(date) "
echo " $(whoami) is currently logged in "
now my question is how to change the code so that the info is not... (12 Replies)
Discussion started by: me.
12 Replies
5. Shell Programming and Scripting
Hi All,
I'm a newbie here, I'm just wondering how can i put into the logs of the exact doing of script.
ex.:
test1.sh
abcd@10.226.144.180's password:
20111102 17:20:02 || FILE FOUND IN ICCBS SERVER
20111102 17:20:02 || ACCESS ICCBS SERVER TO GET FILES
Connecting to 10.226.144.180...... (1 Reply)
Discussion started by: nikki1200
1 Replies
6. Shell Programming and Scripting
Hi Expert,
I need help on script to put colon between two characters.
From this line 60060160B18414009C557D9DE02CDF11
to this 60:06:01:60:B1:84:14:00:9C:55:7D:9D:E0:2C:DF:11
Any way to make it on script. (2 Replies)
Discussion started by: ranjancom2000
2 Replies
7. Programming
Hi Guys,
Can someone please help me on adding/inserting a variable to an sql scipt? Basically I want to assign today's date. As shown below..
set head off;
set linesize 300;
set pagesize 200;
spool /opt/oracle/temp/output.txt
select value,count(*) as totalcount from pmowner.pinpebasev... (11 Replies)
Discussion started by: pinpe
11 Replies
8. Shell Programming and Scripting
Hi guys, I have a script which clears down a range of directories, however it can take a while to run. Is there a way I can simplify the below, perhaps adding it into a case statement?
client_directories=/usr/local/production/cleanup/bin/client_cleanups/client_directories.txt
# clear down... (2 Replies)
Discussion started by: JayC89
2 Replies
9. Solaris
Hi All,
O/S: Solaris 5.10
Software installed :-
Oracle 10G
Weblogic 10.30
the problem i face that
when the server restart for any reason
SQL> exit
bash-3.00# sqlplus sys/manchester as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Sun May 2 11:04:50 2010
Copyright (c)... (3 Replies)
Discussion started by: xxmasrawy
3 Replies
10. Shell Programming and Scripting
Hi there, this is part of my script:
/usr/bin/cd /u01/oradata
/usr/bin/cp `/bin/ls -1 . |grep -v "^DIMStemp01.dbf$" | grep -v "^DIMSts01.dbf$"|grep -v "^DIMStects01.dbf$"` /backup
It's working fine when I manually run on telnet session.
/bin/ls -1 . -- to list all the files inside... (2 Replies)
Discussion started by: *Jess*
2 Replies