10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
In an attempt to finally end this article I start this new thread.
Here is a template for a safe and portable script.
#!/bin/bash
# /bin/bash exists on most still supported Unixes
#
# tr and date behave better with
if ; then export LC_ALL=C; else export LANG=C; fi
#
# Unix optional packages... (2 Replies)
Discussion started by: MadeInGermany
2 Replies
2. Shell Programming and Scripting
All,
I have a need for a portable shell script for LInux and HPUX. The script has a simple need; Check for local files of a specific name (i.e. filename*), scp them to another system, and archive them to a folder. The script runs via cron.
I first wrote the script in Linux (bash with gnu... (4 Replies)
Discussion started by: hburnswell
4 Replies
3. Shell Programming and Scripting
Hi,
I have a script invest.sh which takes two inputs i.e the name of the properties file and the file permissions for eg:
./invest.sh app12.properties 664Now i wish to give a folder path /opt/app/properties instead of the properties file and the invest.sh script should lookout for all the... (3 Replies)
Discussion started by: mohtashims
3 Replies
4. Shell Programming and Scripting
I currently have a shell script that utilizes the "Date" binary - this application is slightly different on OS X (BSD General Commmand) and Linux systems (gnu date). In particular, the version on OS X requires the following to get a date 14 days in the future "date -v+14d -u +%Y-%m-%d" where gnu... (1 Reply)
Discussion started by: colinjohnson
1 Replies
5. Shell Programming and Scripting
Hi,
I need to query Oracle database for 100 users. I have these 100 users in a file. I need a shell script which would read this User file (one user at a time) & query database.
For instance:
USER CITY
--------- ----------
A CITY_A
B CITY_B
C ... (2 Replies)
Discussion started by: DevendraG
2 Replies
6. Shell Programming and Scripting
Hi Admins,
count=`ps -ef | grep LIST_8i | grep -v grep|wc -l`
pid=`ps -ef|grep LIST_8i|grep -v grep|awk '{print $2}'`
if
then
lsnrctl stop LIST_8i >> ${log}
sleep 5
lsnrctl start LIST_8i >> ${log}
else
echo " "
lsnrctl start LIST_8i >> ${log}
fi 2>&1
The script restarts... (5 Replies)
Discussion started by: newaix
5 Replies
7. Shell Programming and Scripting
Hi,
I have a requirement as below which needs to be done viz UNIX shell script
(1) I have to connect to an Oracle database
(2) Exexute "SELECT field_status from table 1" query on one of the tables.
(3) Based on the result that I get from point (2), I have to update another table in the... (6 Replies)
Discussion started by: balaeswari
6 Replies
8. Shell Programming and Scripting
hi all
i have a shell script for connecting in sybase env what i need is i have around 10 servers , i need to connect to all servers and retrive the database inforamtion in the servers and display them
any one of u have it request to share it asap !
"QUERY TO Connect to all servers... (1 Reply)
Discussion started by: mvsramarao
1 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I am trying to write an expect script that contains an if/else statement based on a result ... but I'm having a bit of trouble. The code below shows my script - it all works fine but when I include the second expect function it ignores it and moves on ... can anyone help with this ...... (1 Reply)
Discussion started by: spikey
1 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I am stuck assigning a value to a variable.
I am trying to assign a value to a variable but getting error....
IP_ADDR=grep 'I.P. Address' /install/cfgdist/`uname -n`.cfg | cut -d : -f 2| cut -d . -f 1-3| sed s/" "//g
I am using this script to grep first three octets of an IP address... (4 Replies)
Discussion started by: max29583
4 Replies