JonasGoetz01 / 42-minishell

Built your very own shell, Minishell! Explore executing commands, managing history, and controlling inputs and outputs. Dive into handling processes and files while creating a user-friendly shell interface. Get hands-on with shell scripting in a fun and accessible way with Minishell (DONT PANIC SHELL)!
1 stars 1 forks source link

/bin/echo test1 test2 #231

Closed JonasGoetz01 closed 6 months ago

JonasGoetz01 commented 6 months ago

test1 und test2 sind ein argument???

PaulicStudios commented 6 months ago

eigentlich nicht, laut meinem testen funktioniert das auch genauso wie in Bash

/workspaces/42-minishell ❯ /bin/echo test1 test2 | wc
Tokens:
Type: 0, Value: /bin/echo
Type: 15, Value:  
Type: 0, Value: test1
Type: 15, Value:  
Type: 0, Value: test2
Type: 15, Value:  
Type: 8, Value: |
Type: 15, Value:  
Type: 0, Value: wc
Tokens:
Type: 0, Value: /bin/echo
Type: 15, Value:  
Type: 0, Value: test1
Type: 15, Value:  
Type: 0, Value: test2
Type: 15, Value:  
Type: 8, Value: |
Type: 15, Value:  
Type: 0, Value: wc
Tokens:
Type: 0, Value: /bin/echo
Type: 15, Value:  
Type: 0, Value: test1
Type: 15, Value:  
Type: 0, Value: test2
Type: 15, Value:  
Type: 8, Value: |
Type: 15, Value:  
Type: 0, Value: wc
Input is valid
Tokens:
Type: 0, Value: /bin/echo
Type: 15, Value:  
Type: 0, Value: test1
Type: 15, Value:  
Type: 0, Value: test2
Type: 15, Value:  
Type: 8, Value: |
Type: 15, Value:  
Type: 0, Value: wc
Highest token: |
Highest Bracket Level: 0
Highest token: test2
Highest Bracket Level: 0
Highest token: wc
Highest Bracket Level: 0
    Type: 15, Value:   Prio: -1
    Type: 0, Value: wc Prio: -1
Type: 8, Value: | Prio: 3
    Type: 0, Value: /bin/echo Prio: 1
    Type: 15, Value:   Prio: 1
    Type: 0, Value: test1 Prio: 1
    Type: 15, Value:   Prio: 1
    Type: 0, Value: test2 Prio: 1
    Type: 15, Value:   Prio: 1
-----
    Type: 15, Value:   Prio: -1
    Type: 13, Value: wc Prio: -1
Type: 8, Value: | Prio: 3
    Type: 13, Value: /bin/echo Prio: -1
    Type: 15, Value:   Prio: -1
    Type: 14, Value: test1 Prio: -1
    Type: 15, Value:   Prio: -1
    Type: 14, Value: test2 Prio: -1
    Type: 15, Value:   Prio: -1
executing /bin/echo: in -1 out 4
executing wc: in 3 out -1
waiting for /usr/bin/wc...
      1       2      12
waiting for /bin/echo...

Bash:

/bin/echo test1 test2 | wc
      1       2      12
JonasGoetz01 commented 6 months ago

okay, jetzt ist das bei mir auch nicht mehr