latest pushes

This commit is contained in:
2024-10-05 11:54:36 -04:00
parent 482ffe0604
commit b0a2610d70
8 changed files with 43 additions and 123 deletions

View File

@@ -5,27 +5,27 @@
# Create a test file
echo "Creating test file..."
echo "Hello, World!" > test.txt
write test.txt "Hello, World!"
# Read the contents of the file
echo "\nReading test file:"
cat test.txt
read test.txt
# Append to the file
echo "\nAppending to test file..."
echo "This is a new line" >> test.txt
append test.txt "This is a new line"
# Read the updated contents
echo "\nReading updated test file:"
cat test.txt
read test.txt
# Write to a new file
echo "\nWriting to a new file..."
echo "This is a new file" > new_file.txt
write new_file.txt "This is a new file"
# Read the new file
echo "\nReading new file:"
cat new_file.txt
read new_file.txt
# List files in the current directory
echo "\nListing files in the current directory:"
@@ -35,26 +35,6 @@ ls -l
echo "\nRenaming file..."
mv new_file.txt renamed_file.txt
# Check if file exists
echo "\nChecking if files exist:"
if [ -f "test.txt" ]; then
echo "test.txt exists"
else
echo "test.txt does not exist"
fi
if [ -f "new_file.txt" ]; then
echo "new_file.txt exists"
else
echo "new_file.txt does not exist"
fi
if [ -f "renamed_file.txt" ]; then
echo "renamed_file.txt exists"
else
echo "renamed_file.txt does not exist"
fi
# Delete files
echo "\nDeleting files..."
rm test.txt renamed_file.txt