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

Redirection Before Command #11

Closed
tesla33io opened this issue Jul 14, 2024 · 0 comments
Closed

Redirection Before Command #11

tesla33io opened this issue Jul 14, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@tesla33io
Copy link
Owner

When a redirection occurs before a command, the output is still sent to STDOUT instead of the specified file. The file is created but remains empty.

Example:

$ ./minishell
(/home/artem/projects/minishell) $> > f2 echo "not in the file =("
"not in the file =("
$ cat f2 | cat -e

$

In this case, the expected behavior is that the content "not in the file =(" should be written to f2 instead of being printed to STDOUT.

@tesla33io tesla33io added the bug Something isn't working label Jul 14, 2024
@tesla33io tesla33io self-assigned this Jul 14, 2024
@tesla33io tesla33io reopened this Jul 31, 2024
tesla33io added a commit that referenced this issue Jul 31, 2024
fix: syntax error when empty command

did not tested with multiple redirections

also heredoc and append does not work before the command but MS does not crash either

Refs: #11 #13 #18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant