Skip to content

No redirects are processed correctly in shell-to-batch conversion. #72

@rburkey2005

Description

@rburkey2005

When converting a shell script to a batch file, no redirect is processed correctly. For example, my shell script contains the redirects

...command1... &> /dev/null
...command2... > module.v
...command3... < module.v

As I understand it, these should be converted in the batch file to

...command1... > NUL 2>&1
...command2... > module.v
...command3... < module.v

Instead, they are converted to

...command1...
REM UNKNOWN: {"type":"Redirect","op":{"text":">","type":"great"},"file":{"text":"/dev/null","type":"Word"}}
...command2... REM UNKNOWN: {"type":"Redirect","op":{"text":">","type":"great"},"file":{"text":"module.v","type":"Word"}}
...command3... REM UNKNOWN: {"type":"Redirect","op":{"text":"<","type":"less"},"file":{"text":"module.v","type":"Word"}}

I have tried this both with and without a space between the redirection operator and the file to/from which redirection is supposed to occur. This happens on Linux Mint 21.3.

For what it's worth, my original shell script is attached, though renamed with a .txt extension, since attachments with the extension .sh are not allowed by the issue-tracker: simulateModuleII.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions