Search Results

Search: Posts Made By: wtolentino
4,144
Posted By wtolentino
that works thanks.
that works thanks.
4,144
Posted By wtolentino
Extract directory path from a parameter
i was attempting to extract a directory path that was passed from a parameter with this code

vdir=`dirname $p1`
echo current directory $vdir


it does not work when the parameter passed has...
11,394
Posted By wtolentino
I replaced the code with this smaller code and it...
I replaced the code with this smaller code and it works.


p1=$1
pday=$2

for f in $(ls -1 $p1)
do
vfile=`basename $f`
echo $vfile
for i in `find . ! -name . -prune -type f -name...
11,394
Posted By wtolentino
tried to wrap the first parameter with double...
tried to wrap the first parameter with double quotes but still would not work.
11,394
Posted By wtolentino
tried this still don't work. pday="${2}" ...
tried this still don't work.
pday="${2}"

maybe I am doing it wrong.
11,394
Posted By wtolentino
originally it was written on AIX and is working...
originally it was written on AIX and is working fine then had to moved the to same script to Linux. basically the goal of the script is to find a file that is days old depending on the parameter.
...
11,394
Posted By wtolentino
Find: missing argument to `-mtime'
this find command works when using manually on the command line

--
$ ls -latr file*.log
-rw-r--r-- 1 oracle dba 75 Jan 4 05:00 file_2.log
-rw-r--r-- 1 oracle dba 75 Jan 4 05:00 file_1.log
$...
8,937
Posted By wtolentino
thanks so much both solutions works.
thanks so much both solutions works.
8,937
Posted By wtolentino
How To Read a File and Assign the line values to an Array?
i have this basic code that i wrote to read a file and place it's values to an array. the source/input file will have multiple strings on it that is separated by a whitespace.

sample_list.txt file...
2,989
Posted By wtolentino
Shell script verify connection to Oracle if not successful
i have a script that connects to the oracle database and executes the query statements. it works fine and i would like to add some message to check if the connection to oracle is not successful.
...
1,184
Posted By wtolentino
it did not work. sh sample2.sh ...
it did not work.


sh sample2.sh
sample2.sh: line 2: .: dbParam.ini: file not found
user
current password
new password


--- Post updated at 09:25 AM ---

I got it working by changing...
1,184
Posted By wtolentino
Script Parameter Pass to Another Script
How do I pass a parameter from one script to another script?

dbParam.ini

pUser=Magic
pPwd=Test1234
pNewPwd=HappyMeal


sample2.sh

#!/usr/bin/ksh
. .dbParam.ini
echo "user $pUser"...
1,237
Posted By wtolentino
Attemp to call the .profile
i have this line of code on my script


#!/bin/sh

#enable the environment variable thru profile
. .profile



when i run the script it was unable to find the .profile

sh ChgPwd.sh...
Forum: AIX 03-13-2018
3,755
Posted By wtolentino
Sudo command prompt for a password
in the /etc/sudoer file this line was added:
wtolentino ALL=(ORACLE) NOPASSWD: /bin/chmod

when i tried to run this command
sudo -u oracle /bin/chmod 775...
2,371
Posted By wtolentino
$ ls -lib total 472 204826 drwxrwxr-x 2...
$ ls -lib
total 472
204826 drwxrwxr-x 2 ora102 lpsgrp 256 Apr 03 2009 executables
204827 drwxrwxr-x 2 ora102 lpsgrp 12288 Nov 13 14:31 forms
204828 drwxrwxr-x 2...
2,371
Posted By wtolentino
i entered these commands: $ ls -lib ...
i entered these commands:


$ ls -lib
total 472
204826 drwxrwxr-x 2 ora102 lpsgrp 256 Apr 03 2009 executables
204827 drwxrwxr-x 2 ora102 lpsgrp 12288 Nov 13 14:31...
2,371
Posted By wtolentino
File and Directory same name
i need to remove a file the problem is it will not let me remove a file because it thought that i was instructing it to remove a directory. the issue was that the file and directory has the same...
5,615
Posted By wtolentino
OS is IBM-AIX Version 6.1 ---------- Post...
OS is IBM-AIX Version 6.1

---------- Post updated at 04:40 PM ---------- Previous update was at 03:48 PM ----------

i run this script with these small line of codes for debugging purpose.
...
5,615
Posted By wtolentino
i tried this and it does not return anything ...
i tried this and it does not return anything


$ fuser -V sfs_pcard_load_file.ksh
sfs_pcard_load_file.ksh:

$


in the script

fopen=`fuser -V sfs_pcard_load_file.ksh`
echo "file open...
5,615
Posted By wtolentino
Inconsistent `ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l`
i have this line of code that looks for the same file if it is currently running and returns the count.


`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l`


basically...
3,722
Posted By wtolentino
that works thank you
that works thank you
3,722
Posted By wtolentino
#!/usr/bin/ksh # # Check for required number...
#!/usr/bin/ksh
#
# Check for required number of parameters if any are expected
#--------------------------------------------------------------------
#
if [[ $# != 0 ]]; then
print "ERROR:...
3,722
Posted By wtolentino
ERROR: Required Parameters Missing
i have modified a korn shell script to include a parameter and i coded the parameter as

pSec=$1
pLoopCnt=$2

wheni run the script it gives me an error

$ ksh sfs_pcard_load_file.ksh 30 3...
2,841
Posted By wtolentino
that works thanks so much
that works thanks so much
2,841
Posted By wtolentino
Using grep command to detect presence of script run
i have this line of code on a korn shell script to detect the presence of script run:

ISRUNNING=`ps -eaf -o args | grep -i sfs_load_file.ksh | grep -v grep | wc -l`
sometimes this returns either...
Showing results 1 to 25 of 70

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