10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I am using below code :
export ORAR=orp712z.int.thomsonreuters.com
#echo $ORAR;
if echo $ORAR|grep -i "_"
then
ORACLE_SID1= echo $ORAR|cut -f2 -d "_"
echo $ORACLE_SID1
ORACLE_SID=fgrep "$ORACLE_SID1" /etc/oratab|cut -f1 -d ":"
#echo $ORACLE_SID
else
ORACLE_SID1= echo $ORAR|cut... (1 Reply)
Discussion started by: admin_db
1 Replies
2. Shell Programming and Scripting
Hi,
If I hard code a value in the grep it works fine from script, when I use variable it doesn't work. On a seperate note, some lines (during testing) works fine from command line but not from scirpt.
#!/bin/bash
# Will fetch the (oldest - as ls will sort by name by default)Date in the... (7 Replies)
Discussion started by: krish.m
7 Replies
3. AIX
One of my shell script, I'm using shell variable to substitute parameter value to a oracle related command "tnsping". without substitution same value is working fine. see below example.
Below is the result is expected with command:
> tnsping "(ADDRESS = (PROTOCOL = TCP)(HOST = uedcb031)(PORT... (4 Replies)
Discussion started by: sendtoshailesh
4 Replies
4. Shell Programming and Scripting
I have a requirement to change user inside a shell script and execute group of commands. I have done it many times earlier but never came across the issue with exporting variables. Strangely if a var is exported afetr su, it is not working where as if it is does outside su, it works. Another issue... (8 Replies)
Discussion started by: sasiharitha
8 Replies
5. Shell Programming and Scripting
Hi
I want export input data ...
echo "month: "
read m
export m=$m
also export m is not working ?
the month-variable should be exportet for the use in other scripts,
but it is not working like this. What i'm doing wrong?
Thanks in advance!
IMPe (10 Replies)
Discussion started by: IMPe
10 Replies
6. Shell Programming and Scripting
Hi
what i want:
listing files in a special range
ls -lrt 20120601{05..06}*
...
-rw-rw-r-- 1 imp imp 279 1. Jun 07:51 201206010550
-rw-rw-r-- 1 imp imp 279 1. Jun 07:01 201206010600
-rw-rw-r-- 1 imp imp 279 1. Jun 07:11 201206010610
-rw-rw-r-- 1 imp imp 279 1. Jun 07:21... (1 Reply)
Discussion started by: IMPe
1 Replies
7. UNIX for Dummies Questions & Answers
Hi all,
Am writing a ksh script where I am looking for processes that has gone defunct and all of which has the same PPID
PID is the variable that I need to match as this is the process ID of the processes that has gone defunct
Am just curious how come the following DOES NOT work?
ps... (6 Replies)
Discussion started by: newbie_01
6 Replies
8. Shell Programming and Scripting
Hi,
I have a script where I am trying to set a local variable using the following,
MYVAR="$NAME"_"$NAME2".txt
where say,
NAME = one
NAME2 = two
so I want the output one_two.txt but what I am getting is,
two.txt
basically the $NAME2 is overwriting, what am I doing wrong?
... (3 Replies)
Discussion started by: walsh_j
3 Replies
9. Shell Programming and Scripting
#!/usr/bin/bash
if
then
echo "Not valid arguments entered. Just username should be entered."
else
USER_NAME=$1
FILE_NAME=$USER_NAME.info
UNN=STUDIN\\\\$1
echo $UNN
last STUDIN\\\\$1
last UNN
If I type `last STUDIN\\eip060` it works but if I try to expand it with variable it is... (5 Replies)
Discussion started by: Zammy_bg
5 Replies
10. Shell Programming and Scripting
Hi :)
The next script campares two files File1-Line1 vs File2-Line1, File1-Line1 vs File2-Line2... only if line contains "AS-", if LineX is not in File2 writes in aux, but "valor" is allways=1 never changes! :confused: What is wrong?
valor changes to 0 before break, after brake is again 1
... (3 Replies)
Discussion started by: agustincm
3 Replies