Search Results

Search: Posts Made By: neil.k
1,209
Posted By neil.k
The issue is wrapper itself executes a while loop...
The issue is wrapper itself executes a while loop as well. Can I execute wrapper.sh in a loop (progress on previous instance completion) without modifying wrapper.sh


xpgm=$( basename $0 )
...
1,209
Posted By neil.k
Loop to run commands - after the previous instance completed
Hi All,

I am trying to call a shell script in a loop. I want my first instance to complete, and then the 2nd instance of the command to start - and so on.

eg. I am running this script 30 times....
11,449
Posted By neil.k
Execute Oracle gather stats via shell script
Hi ,

I am trying to automate a gather stats in shell script


#!/usr/bin/ksh

export ORACLE_HOME=/orcl/app/oracle/product/11.2.0.1/db_1
export PATH="$PATH:$ORACLE_HOME/bin"
export...
1,985
Posted By neil.k
Shell/perl script to check for files
Hi,

I am trying to write a script for following scenario:

I have a list of countries from where I receive files...eg. (Indonesia, Thailand, Australia...etc)

For each country, I have a list...
34,022
Posted By neil.k
Why are you converting from string to date and...
Why are you converting from string to date and back to string?

If you just want to proceed to the next date why not just increment the DD value in your YYYYMMDD string. Just add some logic to make...
843
Posted By neil.k
@itkamaraj Thanks! it worked. But can you...
@itkamaraj
Thanks! it worked.
But can you tell me what was the issue, when do we use square brackets in while?
And it would be helpful if you could share also what " -z not found " means.
...
843
Posted By neil.k
Need help with while loop
Hello,

I need some help with while loop - in the condition I would like to check if the variable is defined but empty.

db_up=`ps -ef|grep pmon|grep $ORACLE_SID | awk '{print $NF}'`
while( -z...
10,128
Posted By neil.k
Calling multiple functions in parallel
Hello,

I have multiple functions within a shell script. eg. function_database_backup, unix_tar_creation, etc.

I would like to run these functions in parallel, as each is independent of the...
1,422
Posted By neil.k
@balajesuri I am not sure if you understood my...
@balajesuri I am not sure if you understood my question. Thanks anyways.

The reason my if was not working is because, I had an extra space maybe in the output of my unix command. I used chomp ,...
3,281
Posted By neil.k
Thanks all! I used who am i|awk '{...
Thanks all!

I used

who am i|awk '{ print $1F }'


Thanks
1,422
Posted By neil.k
@balajesuri not sure what you are trying to...
@balajesuri not sure what you are trying to imply.

The variable who_user will essentially hold a value which I need to check against the keys in the hash user. Whether it's whoami or what I have...
1,422
Posted By neil.k
Help needed with if..exists in hash in perl
Hi,

So I have a hash,


%users = ("abc1" => "John Doe",
"xyz2" => "Mary Jane");
and a variable

my $who_user = `who am i|awk '{ print \$1F }'`;
How do I use exists to...
2,291
Posted By neil.k
Hi , Thanks for your replies, here's what I...
Hi ,

Thanks for your replies, here's what I got working


animals="dog,cat,horse"
if [[ "${animal}" == *${mammal}* ]]
The reason behind adopting this kind of approach is because, i wanted to...
2,291
Posted By neil.k
Help with if statement syntax
Hi,

Is there a way to compare the value in if condition with a list of values.


eg . if [[ $a in cat,dog,horse ]]
then
echo "it's a mammal"
else
echo "its not"
...
3,281
Posted By neil.k
sh script to get unix username of person executing it
Hi,

I am writing a script, and I need to incorporate some logic where I can find out the unix username of the person who is executing the script.

The issue is , a particular user could have...
25,052
Posted By neil.k
Printing characters at specific position in line
Hi,

I am trying to get an output like :


+----------------------------------+ ----------- +
+ some variable substitution + some text +
Is there a way I can specify in printf...
Forum: OS X (Apple) 01-19-2012
5,277
Posted By neil.k
How to access a NTFS partition on hard drive through Terminal in OSX ?
Hi ,

I have a Mac OS X Lion mac book pro. I have a hard drive which I have partitioned in two

(a) OSX Partition - Mac OS Extended Journaled format. Mount point: /
(b) Data Partition - Windows...
41,518
Posted By neil.k
find . -name "*.*" | xargs grep "help"
Hi all,

I am a unix noob. Need some basic help. I have tried using google, but not able to figure this out.

Here are the scenarios:

1. How do I find a directory with a particular name, say...
Forum: Solaris 01-21-2011
2,440
Posted By neil.k
Name file with sys date
Hi,

I would like to rename log files with sys date as extension.
eg xyz.log --> xyz.log.01-21-2011

How do I do this? Any hints?
4,709
Posted By neil.k
Ok, I was told, I can't pull the file from ford...
Ok, I was told, I can't pull the file from ford (assuming I was logged into XTRA400) because of the firewall.

I must push the file from ford to xtra400 using scp.

Any ideas how do I do that??
4,709
Posted By neil.k
Copying a file from one server to another (behind firewall.)
Hi,

I want to copy a file from one server A to another server B. Usually I use

scp username@source-server:/path . (from the destination folder)

However, in this particular case, I have...
Showing results 1 to 21 of 21

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