1
2
3
4
5
6
7
8
9
10
11
info("Versuch 1");
my $restore = "su - $orauser -c 'brrestore –m full –b $backup –r /tmp/init${SSID}.utl'";
info("$restore");
my $restore2 = 'brrestore –m full –b ' . $backup . ' –r /tmp/init' . ${SSID} . '.utl';
my $su = "su - $orauser -c";
info("Versuch 2");
info($su ." '" .$restore2."'");
system $restore;
system ($su ." '" .$restore2."'");
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
26.07.2013 10:31:19: info: Versuch 1
26.07.2013 10:31:19: info: su - oraDEV -c 'brrestore m full b backup.aff r /tmp/initDEV.utl'
26.07.2013 10:31:19: info: Versuch 2
26.07.2013 10:31:19: info: su - oraDEV -c 'brrestore m full b backup.aff r /tmp/initDEV.utl'
BR0401I BRRESTORE 7.20 (17)
BR0154E Unexpected option value 'm' found at position 1
BR0154E Unexpected option value 'full' found at position 2
BR0154E Unexpected option value 'b' found at position 3
BR0154E Unexpected option value 'leer' found at position 4
BR0154E Unexpected option value 'r' found at position 5
BR0154E Unexpected option value '/tmp/initDEV.utl' found at position 6
BR0406I End of file restore: relsnwlz.log 2013-07-26 10.31.19
BR0280I BRRESTORE time stamp: 2013-07-26 10.31.19
BR0404I BRRESTORE terminated with errors
BR0401I BRRESTORE 7.20 (17)
BR0154E Unexpected option value 'm' found at position 1
BR0154E Unexpected option value 'full' found at position 2
BR0154E Unexpected option value 'b' found at position 3
BR0154E Unexpected option value 'leer' found at position 4
BR0154E Unexpected option value 'r' found at position 5
BR0154E Unexpected option value '/tmp/initDEV.utl' found at position 6
BR0406I End of file restore: relsnwlz.log 2013-07-26 10.31.19
BR0280I BRRESTORE time stamp: 2013-07-26 10.31.19
BR0404I BRRESTORE terminated with errors
1 2 3 4 5 6 7 8 9
my @cmd = ( 'su', '-', $orauser, '-c', "brrestore –m full –b $backup –r /tmp/init${SSID}.utl", ); system( @cmd ) == 0 or die "system(@cmd) failed: $!\n";
man suCode: (dl )1
2
3
4
5
6
7
8
9
10
11
12
13
14...
NAME
su - run a shell with substitute user and group IDs
SYNOPSIS
su [OPTION]... [-] [USER [ARG]...]
DESCRIPTION
Change the effective user id and group id to that of USER.
-, -l, --login
make the shell a login shell
...
2013-07-26T09:53:09 GwenDragon– ist niemals ein Minuszeichen!
Schau:
– Gedankenstrich
- Minus
Du solltest entweder einen anderen Editor benutzen, der richtige - verwendet oder nicht einfach so aus Webseiten/Blogs Code kopieren, bei denen nämlich schnell mal aus -- ein – (Gedankenstrich!) gemacht wird.
2013-07-26T10:44:53 PussufWenn Word glaubt, ein - (Minus) muss zum Bindestrich werden, macht es das.Der Code war aus einem Word-Dokument kopiert.