Skip to content

TEST Commands for minishell

panndabea edited this page Jan 16, 2024 · 5 revisions

echo $USER '$USER' ' $USER ' "'$USER'" "$USER"

Simple Command

ls /bin/ls date whoami

Arguments

/bin/ls src /bin/ls src/vars touch filetest cp Makefile filetest cat filetest mkdir foldertest ls -l -a

exit

exit exit 42 exit -666 exit 123 456

return value of a process

/bin/ls asdf expr $? + $?

signals

use the evaluation sheet

Double Quotes

ls "src" this should work__

ls " src " this evaluates not

ls "-l -a" this evaluates not

echo "cat lol.c | cat > lol.c"

single Quotes

ls 'src' this should work__

ls '' this evaluates not

echo '$USER > huhu' this evaluates not

echo '$USER > huhu | nothing | wc' this evaluates not

echo '$USER' this evaluates not

env

env

export

unset TERM clear TERM=xterm-256color export TERM clear

unset

see above

cd

cd src/vars cd .. cd ../.. pwd cd minishell cd .

pwd

pwd cd .. pwd cd minishell pwd