cancel
Showing results for 
Search instead for 
Did you mean: 

Wild Cards in External Operating System Commands for HP-UX

Former Member
0 Kudos

Hello,

Is it possible to use wildcards for HP-UX commands in SM69?

For example, I would think the following would work in HP-UX:

mv /directory/file_name.* /directory2

But whenever I execute a command with the * wildcard in SM69 I get the message 'No such file or directory'

Thanks,

Joel

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi all,

in some Operating Systems Unix like, such as HP-UX and AIX, the use of widlcards in absolute paths has been disabled for security reasons.

So, if you have to copy all files from Directory /tmp/xxx/ to /tmp/yyy, you cannot use the command:

cp /tmp/xxx/* /tmp/yyy

If you are using a script, for Bash or Korn Shell for instance, try to 'navigate' the folders and perform local operations.

Example:

cd /tmp/XXX/

cp (asteriskDOTasterisk) /tmp/yyy

cd <your working directory>

Best Regards,

Antonio Longo

Edited by: indetony on Dec 14, 2009 3:24 PM

Edited by: indetony on Dec 15, 2009 11:20 AM

Former Member
0 Kudos

It exists. I can do a

ls /usr/afisinw_cpafiscd/WHSE/ready/portalActivityOld

in SM69 and see the contents.

Former Member
0 Kudos

Did you try putting mv in the 'operating system command' field, and the rest of it in the 'parameters for operating system command' field? That works fine for me, with an * in the parameters field. Eg:

operating system command:

/usr/bin/rm

parameters for operating system command

/var/tmp/joe* /var/tmp/ixx*

Cheers,

David.

Former Member
0 Kudos

This is wierd, I can't even do 'ls *.TRC'

Here's another example, using absolute path names that didn't work:

mv /usr/afisinw_cpafiscd/WHSE/ready/portalActivity_311688752_1243622628104.* /usr/afisinw_cpafiscd/WHSE/ready/portalActivityOld

error: cannot access: No such file or directory External program terminated with exit code 1

But when I replace the * with txt it works. Unfortuneately I need to move multiple portalActivity files each time, and the beauty of using an external command is that my ABAP program is only a few lines long.

Could there be some sort of a safety feature in SAP to prevent the use of * in external commands?

Former Member
0 Kudos
mv /usr/afisinw_cpafiscd/WHSE/ready/portalActivity_311688752_1243622628104.* /usr/afisinw_cpafiscd/WHSE/ready/portalActivityOld

error: cannot access: No such file or directory External program terminated with exit code 1

Create portalActivityOld directory if it doesnot exists in /usr/afisinw_cpafiscd/WHSE/ready and then try

sunny_pahuja2
Active Contributor
0 Kudos

Hi Joel,

Check below link:

http://unix.t-a-y-l-o-r.com/USwild.html

Thanks

Sunny

Former Member
0 Kudos
mv /directory/file_name.* /directory2

Please try with the absolute path names.

Former Member
0 Kudos

Hi

Check this out

[Link1|http://help.sap.com/saphelp_45b/helpdata/EN/fa/097215543b11d1898e0000e8322d00/frameset.htm]

Regards

Uday