tut 3 Flashcards
1
Q
Bash Shell Script
A
!/bin/bash
for file in *
do
echo $file
done
(* means all the files in the current directory)
2
Q
what if we want to repeat or add any loops in the bash shell script?
A
!/bin/bash
for file in *
do (add it in between the do and done script)
echo $file
done
3
Q
what if you want to add in files from a specific directory?
A
!/bin/bash
for file in /home/ict246/Desktop/*
do
echo $file
done
4
Q
while loop
A