Search Results

Search: Posts Made By: xiamin
6,601
Posted By xiamin
Hi Apologies as i am unable to see a...
Hi

Apologies as i am unable to see a solution to my problem in that link.
My problem is remotely editing crontab over ssh
6,601
Posted By xiamin
remotely append crontab over ssh
Hi

I would like to append/modify crontab remotely over ssh and this is what i have tried so far.


text.txt contains the following line.
0,15,30,45 * * * * /home/local/hello.sh

cat text.txt...
2,949
Posted By xiamin
Hi I get something like grep: 0652-033...
Hi

I get something like

grep: 0652-033 Cannot open volume.
grep: 0652-033 Cannot open identifier

regards
2,949
Posted By xiamin
executing commands over ssh
Hi

I am trying to send a command over ssh with a parameter but the shell fails to expand the command properly any ideas what am i doing wrong with this.

This is ssh on AIX

for i in 71 72 73...
Forum: Solaris 03-10-2010
8,958
Posted By xiamin
file name from file descriptor
Hi

Can we get the full path of the filename from file descriptor.

pread64(405, "0602\0\0\0960EB9DC BC7F9".., 16384, 0x0000000583AE4000) = 16384

How do i get the filename with full path of...
1,778
Posted By xiamin
Hi Cannot use exit 1 as this is a fucntion...
Hi

Cannot use exit 1 as this is a fucntion and not a program in itself

If i set the line to [ $# -ne 2 ] or to [ $# -ne 1 ] how do i call this function from command line


#!/bin/sh
while...
1,778
Posted By xiamin
net help with getopts
Hi

I have written the following script.
But the variable sid is not getting set why is that.

When i run the script i get the output as

ORATAB FOR is

Instead if i run the script like
...
3,001
Posted By xiamin
Unloading all functions from cache
Hi

I have a following function that i call from my main script in korn shell.

#Unset all functions from the cache


#/bin/ksh
#Unset all functions from the cache

init () {
for func in...
3,937
Posted By xiamin
Hi My script needs to work on many flavours...
Hi

My script needs to work on many flavours of unix.

file_name=$1 Name of the file
archive_dir=$2 Archive directory
retention_period=$3 ...
3,937
Posted By xiamin
Log file rotation
Hi

I am trying to create a simple function that implements log rotation

rotatelogs () {
file_name=$1
archive_dir=$2
retention_period=$3

find $archive_dir -name $file_name -mtime...
2,661
Posted By xiamin
Hi Nila thanks i will try the second option...
Hi

Nila thanks i will try the second option did not have much luck with first one although i would have preferred something like this

conn / as sysdba 2>/dev/null


regards
2,661
Posted By xiamin
supress error messages
Hi

I have a script which connects to oracle using sqlplus

if ! check_sqlplus "$ORACLE_SID" ; then
echo "Unable to use sqlplus for sid $ORACLE_SID"
return 1
else
echo "attempting to...
27,084
Posted By xiamin
Hi wow what a elegant and simple solution...
Hi

wow what a elegant and simple solution thanks for letting me know of this

regards
27,084
Posted By xiamin
current line number in shell script
Hi

I am using korn shell is there a built in or ny other way to get the current line number so i can write the current line number to the logfile to aid in debugging like


logmsg $lineno $date...
2,855
Posted By xiamin
Hi Thank you very much sir regards
Hi

Thank you very much sir

regards
2,855
Posted By xiamin
program name and function name builtins
Hi

Is there a way to get the program/script name or function name usng built ins.

Like in many languages arg[0] holds the program name

regards
2,647
Posted By xiamin
Function returns wrong values - solved
Hi

I have a small function which returns a wrong value.
The function tries to make a connection to oracle database and tries to get the open_mode of the database in the variable status.
...
6,853
Posted By xiamin
Hi Not sure but this started working ...
Hi

Not sure but this started working

for sid in $sids
do
ORACLE_SID=$sid
ORACLE_HOME=$(grep $sid $ORATAB_LOC |cut -f2 -d':')
echo $ORACLE_HOME $ORACLE_SID
...
6,853
Posted By xiamin
Hi This is the complete script. ...
Hi

This is the complete script.


#!/bin/ksh

if ! get_oratab_loc ; then
echo "Unable to determine Oratab directory"
exit 1
fi


sids=$(grep "^[^#+]" $ORATAB_LOC|cut -f1 -d':')
...
6,853
Posted By xiamin
Here document and shell scripting
Hi

I am unable to spot a error with my here document in the shell script.

for sid in $sids
do
ORACLE_SID=sid
ORACLE_HOME=$(grep $sid $ORATAB_LOC |cut -f2 -d':')
...
5,817
Posted By xiamin
Hi Thanks you are a true Unix Guru ...
Hi

Thanks you are a true Unix Guru

regards
5,817
Posted By xiamin
help with find command and prune option
Hi

I have a directory say mydir and inside it there are many files and subdirectories and also a directory called lost+found owned by root user

I want to print all files directories and...
2,110
Posted By xiamin
regex help to get unique hostnames
Hi

I have a file containing hostnames like this

(host=myhost.domain.com) or
(host=myhost)

i need to extarct the unique hostnames without the domain names from that file.
so my output...
20,446
Posted By xiamin
Hi Franklin Thank you for the excellent...
Hi Franklin

Thank you for the excellent explanation.

However what does the -o do it doesnt sem to work on AIX

when i do


echo /u01/Sybase/data/master.dbf | grep '[^/]'


shoudlnt it...
20,446
Posted By xiamin
Hi Thanks to all responded and the responses...
Hi

Thanks to all responded and the responses are also excellent at this point of time i am very keen on the regex solution


echo /u01/Sybase/data/master.dbf | grep -o '[^/]*$'


due to my...
Showing results 1 to 25 of 84

 
All times are GMT -4. The time now is 08:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy