1

I have a set of batch commands that I'm trying to convert to shell so I can use them on my linux environment. The command should read

rcontrib -y  < view\inside_NE.rays -o result/%%04d_inside

In windows (using batch), running this command should produce a set of files that are numbered like this:

0001_inside.hdr 0002_inside.hdr etc.

However, when I ran this command in bash, I expected to get eight files with names that start with 0001 to 0008 but I got only one file which was named 0001_inside. How would I do this in bash? Please note: rcontrib is a command that is part of a package that runs on both linux and windows

If you like this question please vote up.

2
  • 1
    That is not a valid bash command. Show us the equivalent command in Linux that you are trying Commented Apr 24, 2018 at 13:48
  • I updated my post to explain the confusion. rcontrib is a command that is part of a package that runs on both windows cmd and linux Commented Apr 24, 2018 at 13:57

1 Answer 1

3

I think %%04d is to escape '%' in DOS, your rcontrib program probably wants %04d like in c syntax to name the file with a 4 digit integer. In bash you don't need to escape it, have you try this?

rcontrib -y  < view/inside_NE.rays -o result/%04d_inside
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.