YouTip LogoYouTip

Linux Shell Scripting

Shell Scripting

#!/bin/bash
name="World"
echo "Hello, $name!"

for f in *.txt; do
    echo "Processing $f"
done

if [ -f "config.txt" ]; then
    echo "Config exists"
fi

Summary

  • Shell scripts automate Linux tasks
  • Use #!/bin/bash as the first line
← Python3 Type HintsDocker Compose β†’