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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

while loop

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly