curiousgeorge wrote:
i tried to run it and it doesnt work.
How do you know that it doesn't work?
curiousgeorge wrote:
Can you also explain what it is doing??
Loop through each JPG file located in the directory
dir.
If a JPG file's size is equal to 40318 bytes, then print the corresponding filename and the said size to
results.csv.
curiousgeorge wrote:
[...] I dont understand the
Code:
(($(wc -c < "$f") == 40318));
This is the part where you check whether the size of the file being processed is equal to 40318 bytes.
curiousgeorge wrote:
I would imagine like other code
Code:
==
would be the equal than.
Yep,
== means equal to.
curiousgeorge wrote:
Dont I still need to declare f??
Nope,
f is the file being processed in the loop.
It'll take each filename as its value, one by one.
Try this line in your shell if you don't get it yet:
Code:
for w in word1 word2; do echo "$w"; done