קובץ זה מרכז תרחיש בדיקה מלא לטרמינל שפיתחתם במסגרת המטלה.
המטרה היא לבדוק שהפקודות שיישמתם פועלות בצורה תקינה בכל המצבים, כולל רווחים בשמות קבצים, רווחים לפני ואחרי הפקודה, תווים מיוחדים וכדומה.
ls
ls -l
ls # רווחים לפני ואחרי
pwd
whoamiecho "Hello, this is a test file." > file1.txt
read file1.txt
echo "Another file with different content." > "file2 .txt"
read file2 .txt
mkdir test_dir
echo "This is a file inside a directory." > test_dir/file3.txt
read test_dir/file3.txtcp file1.txt file1_copy.txt
read file1_copy.txt
cp "file1.txt" "file1 copy.txt"
read "file1 copy.txt"
cp file2.txt test_dir/
read file2.txt test_dir/
mkdir "test dir"
cp file2.txt "test dir/"
ls -lcd test_dir
pwd
cd ..
pwd
cd "test dir"
pwdexit
exit # רווחים לפני ואחרי
⚠️ שים לב: exit אמור לסגור את הטרמינל, לכן יש להפעיל מחדש את הטרמינל לאחר בדיקה זו.
delete file1_copy.txt
delete "file1 copy.txt"
delete test_dir/file3.txt
ls -lmv file2.txt file2_mvd.txt
mv "file2_mvd.txt" test_dir/
ls -l
ls test_direcho "Appended text line." >> file1.txt
cat file1.txtecho "Overwriting file content." > file1.txt
cat file1.txtread file1.txt
read "file that does not exist.txt"wc -w file1.txt
wc -l file1.txt
wc -w "file that does not exist.txt"ls -l | wc -l
cat file1.txt | wc -wdelete file1.txt
delete test_dir/file2_mvd.txt
delete test_dir- יש לבדוק כל פקודה גם עם רווחים לפני ואחרי.
- יש לבדוק פקודות עם שמות קבצים המכילים רווחים.
- מומלץ להריץ את כל הרצף הזה מתחילתו ועד סופו לאחר כל שינוי שביצעתם בקוד.
בהצלחה! 💪