Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rburkey2005 opened this issue Jan 15, 2025 · 0 comments
Open
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@rburkey2005
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants