Search Results

Search: Posts Made By: Anubhav
10,795
Posted By Anubhav
Try this it should work as long as you have saved...
Try this it should work as long as you have saved file1.txt & file2.txt seprately

diff file1.txt file2.txt | grep ">" | sed 's/>//g'
7,185
Posted By Anubhav
rsh or remsh is the same thing. Regardless of...
rsh or remsh is the same thing. Regardless of what you use if your remote host file (.rhost) files are not correct you won't be able connect between two different hosts.
7,185
Posted By Anubhav
Hmm ok one more thing to check out in that case ...
Hmm ok one more thing to check out in that case

Verify if your .rhosts file in the remote server is configured properly i.e. to allow root access from your local host.

Check $HOME/.rhosts file ...
7,185
Posted By Anubhav
rcp is remote copy. I think you could be getting...
rcp is remote copy. I think you could be getting this for 2 reasons.

A. Either you have 2 different login id's on these 2 machines.

B. The password for login id you are using on the server that...
25,401
Posted By Anubhav
well if there are plain files then you can use...
well if there are plain files then you can use diff or sdiff for that. If you need something exact please provide the actual problem or mirror example for me to look.
25,401
Posted By Anubhav
Code looks ok..however one minor mistake I...
Code looks ok..however one minor mistake I noticed maybe that helps

See below see if it works:

#!/bin/sh
src_path=/home/owngdw/abc
tgt_path=/home/owngdw/abc/xyz
if [ ! -d ${tgt_path} ];...
6,962
Posted By Anubhav
It did not work since your variable wasn't...
It did not work
since your variable wasn't correct, you missed to open quotes before the grep..


YYYYMMDD=`grep "|" $file | nawk -F"|" '{split(substr($2, 1, index($2, " ")-1), t, "-") | print...
5,483
Posted By Anubhav
Also try including your profile in the script...
Also try including your profile in the script your are calling via cron
6,962
Posted By Anubhav
Then it will be best to read the date in as a...
Then it will be best to read the date in as a parameter. So when you run the script

Run it as follows:

eg abc.ksh <YYYYMMDD>

and in the code read $1 in rundate

RUNDATE=$1


Hope that...
6,962
Posted By Anubhav
Your problem seems like is devided into two...
Your problem seems like is devided into two questions.

1st being checking the record count for that you can simply do this:



RUNDATE=`date +%Y%m%d`
COUNTSTAT=`grep "Total record"...
2,968
Posted By Anubhav
Contol M (^M) characters
Is there a way to recursively find scripts/files with ^M characters embedded in them

Usually the case is when a file is saved on unix but in dos/windows format it ends up have ^M characters at the...
3,959
Posted By Anubhav
Thanx so much!!! It worked..I almost had it...
Thanx so much!!!

It worked..I almost had it working with getopts also

but this is cool I will remember this in future

Thanx so much
-Anu
3,959
Posted By Anubhav
*oops I meant parameters r passed by user and r...
*oops I meant parameters r passed by user and r not fixed
3,959
Posted By Anubhav
but the variables are passed by users and they r...
but the variables are passed by users and they r not fixed..

I'd also thought of that but..:-(
2,159
Posted By Anubhav
SO u mean that u want to run this script every 10...
SO u mean that u want to run this script every 10 mins??

* * * * * rsh metal3 /users/test/run.server

If so, then the way is

0,10,20,30,40,50 * * * * rsh metal3 /users/test/run.server

Let...
3,959
Posted By Anubhav
parsing a string into variable
I know solution to this but I was wondering if its easier than what i think

I have to pass 20 parameters to a script, which of course is not working so I parsed $3 to be a pipe deliminated string...
3,356
Posted By Anubhav
Thanx so much guys for all your help
Thanx so much guys for all your help
3,356
Posted By Anubhav
Cool Thanks so much SO this means I have to...
Cool Thanks so much

SO this means I have to do it in 2 different iterations

1. when the job is in running STATE

2. when the job is in Success STATE

hmm.. thanks a lot

one more...
3,356
Posted By Anubhav
vgersh99 thanks for helping first of all. However...
vgersh99 thanks for helping first of all. However issue is still the same when the job in in SU and no feilds are blank it works, however when job is running it doesnt. For example

job2 | tail -2...
3,356
Posted By Anubhav
job returns the following Job Name ...
job returns the following


Job Name Last Start Last End ST Run Pri/Xit
____________________________ ________________ ________________ __ _______ ___
...
4,788
Posted By Anubhav
In ksh connect to sybase (it might differ with...
In ksh connect to sybase (it might differ with the version you use) generically it should be :

isql -U<LOGIN> -P<PASSWD> -S<SERVER> -w2000 << EOF > <LOGFILE>

----Your queries come here ------...
3,356
Posted By Anubhav
help in string search
I am running a command line that I need to grep status of a job

job| tail -2 | head -1 | awk '{print $4,$5,$6}' | egrep "RU|ST|TE|FA|SU|OI|AC|OH"

The above gives me follows:

02/03/2006...
7,604
Posted By Anubhav
Add a little if condition before you expr to...
Add a little if condition before you expr to check if the resulting date is between 1 -9 and if it is then add a 0 as prefix of the $DAY variable
2,428
Posted By Anubhav
Thanks tmarikle!! It worked
Thanks tmarikle!!

It worked
2,428
Posted By Anubhav
Parsing input paramter in a script
Hi folks I am having a little trouble in parsing a variable read into a ksh script

I have a bunch of variables passed into script

test.ksh HOST SERVER JOB1 JOB2 JOB3 JOB4 JOB5

What I want to...
Showing results 1 to 25 of 25

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