Search Results

Search: Posts Made By: zam
2,426
Posted By zam
Thanks for asking right questions..,I figured it...
Thanks for asking right questions..,I figured it out. The code is run as part of the expect script i.e

#!/usr/bin/expect -f
spawn ssh oracle@$myserver $mycommand
match_max 100000
expect...
2,426
Posted By zam
I run it from terminal and login shell , then I...
I run it from terminal and login shell , then I put it in the script and run it as a script with the same results. I need to fix a someone code and trying to simulate it in my environment.
2,426
Posted By zam
Spawn fatal do not run this command by hand
spawn ssh oracle@$myserver $mycommand
match_max 100000
expect "*?assword:*"
send "$v_password\r"
send "\r"
expect eof

I run this code above and got the error.

spawn: fatal: do not run...
6,675
Posted By zam
Thank everyone you for your replies, yes it...
Thank everyone you for your replies, yes it works!

---------- Post updated at 05:08 PM ---------- Previous update was at 05:07 PM ----------

I used this one as it suppresses all output cp -i ....
6,675
Posted By zam
Hi, thanks to reply, I meant that I would prefer...
Hi, thanks to reply, I meant that I would prefer to use cp -n option or similar switch on HP-UX if there is one as I did it on Linux. But I could not find it on HP-UX. I thought maybe there is...
6,675
Posted By zam
Cp -n command
I would like to find a substitute cp -n command in HP-UX
cp -n
-n, --no-clobber
do not overwrite an existing file (overrides a previous -i option)

Thanks

---------- Post...
2,586
Posted By zam
Thanks you a lot!!!! Works just fine!
Thanks you a lot!!!! Works just fine!
2,586
Posted By zam
Execute command using ssh server 'cmd'
Hi
The command below does not work as it require to take command in the breakers
But If I do so the variable values get lost

ssh testserver01 'dsmc q b "${ARCHIVE_DIR}*" -sub=yes -querysummary...
7,449
Posted By zam
Great! Thanks a lot SriniShoo:b:. Much...
Great! Thanks a lot SriniShoo:b:. Much appreciated.
7,449
Posted By zam
Cmd="grep 'Name:' |awk -F' ' '{print $2}'"
Hi

Is it possible to get the below code working.?

cmd="grep 'Name:' |awk -F' ' '{print $2}'|xargs -i basename {}"
echo $cmd
(
rman target / <<EOF1
LIST COPY ;
exit
EOF1
) |...
Forum: Solaris 10-24-2011
9,660
Posted By zam
Thanks a lot!
Thanks a lot!
Forum: Solaris 10-19-2011
9,660
Posted By zam
exclude absolute paths when extracting Tar file?
Hi,
How do I extract data from TAR excluding absolute paths for Tar? (Solaris)

Thanks
4,167
Posted By zam
Thankyou ALL!:b: ---------- Post updated at...
Thankyou ALL!:b:

---------- Post updated at 05:07 PM ---------- Previous update was at 04:51 PM ----------

The code I ended up with!
#!/bin/ksh
for i in *.dbf
do
echo
echo "......
4,167
Posted By zam
Thanks for prompt reply. But it does not work for...
Thanks for prompt reply. But it does not work for me. Did you try it in your environment? I tried on linux BASH and Sun KSH
echo archDP105144_1_702159963.dbf|xargs -I cp {} `echo {}|awk...
4,167
Posted By zam
xargs command
Hi

The command below does not work. what I am doing wrong ?
For some reason second part of the xargs command is not does what I expect
If I get this working I intend to use it for multiple file...
2,051
Posted By zam
Thank you very much itkamaraj. It works fine!
Thank you very much itkamaraj. It works fine!
2,051
Posted By zam
Find command - using regular expr
Hi, I would like to use find command to find file with a predefined extension
for example find . modules/*.ksh *.lib
I thought it's possible to use something like :
find . modules/*.[ksh|lib] but...
1,723
Posted By zam
Wow! Great. It does work indeed. Thanks a lot!
Wow! Great. It does work indeed. Thanks a lot!
1,723
Posted By zam
Thanks :) I get it ! . But it does make life easy...
Thanks :) I get it ! . But it does make life easy as I have no idea what will be placed after $. It will be different all the time
1,723
Posted By zam
this obviously works but I unable to put \ in...
this obviously works but I unable to put \ in front of $ as the string generated by others.

---------- Post updated at 12:04 PM ---------- Previous update was at 12:02 PM ----------

also I...
1,723
Posted By zam
Thanks for the prompt reply. Though I need to use...
Thanks for the prompt reply. Though I need to use ksh commands. (sorry for omitting that)
1,723
Posted By zam
How to strip '$' sign on the line
echo "dddd$dddd"|sed 's/$//' will return dddd
echo "dddd$ddd"|tr -d '$' will return dddd

I need to replace it with any other character or just live a blank space instead

Thank you!
8
AWK
2,070
Posted By zam
Sorry guys, I think I mistyped something...
Sorry guys, I think I mistyped something somewhere. It works!!!
SEARCH_ERRORS='$0 ~ /ORA-/ || $1 ~ /Corrupt/ || $2 ~ /WAITED/'
awk '/.........[0-9][0-9]:[0-9][0-9]:[0-9][0-9] ....$/ {TM=$0}
...
8
AWK
2,070
Posted By zam
Thanks appreciate you assistance! , Yes, you are...
Thanks appreciate you assistance! , Yes, you are right I am passing code. It have not work so far. It look like it interprets $0/$1/etc .. as a module's parameter and not awk's

Wed Mar 16 13:37:12...
8
AWK
2,070
Posted By zam
Hi Would it be possible to make the search...
Hi

Would it be possible to make the search generic. What I mean is to replace search pattern
$0 ~ /ORA-/ || $0 ~ /Corrupt/ with variable say $SEARCH_ERRORS. Say I define SEARCH_ERRORS=" $0 ~...
Showing results 1 to 25 of 114

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