<div dir="ltr">Salutare,<br><br>Am o problema foarte ciudata (si urata) pentru care imi pica _doar_ testele 09, 10, 13, 17, 18.. Am implementat ce trebuie sa faca shellul pentru pipe (sper eu si corect) si iata ce patesc pas cu pas la testul 09, mentionez ca m-am oprit la momentul in care suspectez eu ca da failed la testul 09:<br>
<br>[mihai@blackhole:]$ ./mini-shell<br>> echo '#include <iostream>' | cat > src1.txt<br>> echo 'int main() { int i; std::cin >> i; std::cout << 2 * i; std::cerr << 4 * i; return 0; }' | cat > src2.txt<br>
> cat src1.txt<br>#include <iostream><br>> cat src2.txt<br>int main() { int i; std::cin >> i; std::cout << 2 * i; std::cerr << 4 * i; return 0; }<br>> cat src1.txt src2.txt > src.cpp && rm -f src1.txt<br>
> cat src.cpp<br>cat: @��src.cpp: No such file or directory<br>><br>[mihai@blackhole:]$ cat src.cpp<br>#include <iostream><br>int main() { int i; std::cin >> i; std::cout << 2 * i; std::cerr << 4 * i; return 0; }<br>
<br>De ce dupa ce execut comanda cat src1.txt src2.txt > src.cpp && rm -f src1.txt nu mai pot citi corect de exemplu caracterul s (de fapt observ ca e vorba de prima litera a argumentului unei comenzi). Nu am idee ce sa mai fac si ce bug as putea avea in cod:<br>
<br>> cat src.cpp<br>cat: @�Nsrc.cpp: No such file or directory<br>> cat makefile<br>cat: x's`2makefile: No such file or directory<br>> echo "message"<br>x's`2message<br>> echo "This is a huge bug"<br>
�'s`2This is a huge bug<br><br>Iata si un output de la testul 10:<br><br>> ls -l .. | tr -s ' ' | cut -d ' ' -f 2 > out1.txt<br>cut: you must specify a list of bytes, characters, or fields<br>Try `cut --help' for more information.<br>
> ls: cannot access x���-l: No such file or directory<br>ls: cannot access x���..: No such file or directory<br>tr: range-endpoints of `\177-s' are in reverse collating sequence order<br><br><br><br>--<br>Cu stimă,<br>
Mihai Bărbulescu</div>