Reputation
Top tag
Next privilege 75 Rep.
Set bounties
Badges
1
Newest
 Teacher
Impact
~2k people reached

  • 0 posts edited
  • 0 helpful flags
  • 0 votes cast
Feb
24
comment Script that deletes directories BUT doesn't delete directories with a specific .txt file
Any more specific questions?
Feb
24
comment Script that deletes directories BUT doesn't delete directories with a specific .txt file
Every unix shell descended from the original bourne shell has control flow statements - while, for, if/else etc. In this case, for is used. * expands to a list of files, and the for body is executed for every file. "[" is a executable (look for /bin/[). It is also available under the name "test", read "man test". -d checks whether the next thing is a directory; -f checks whether the next ting is an ordinary file. "continue" is a bash control flow construct, it behaves exactly like "continue" in java or c.
Feb
24
comment Script that deletes directories BUT doesn't delete directories with a specific .txt file
Sorry for the delay :)
Feb
23
answered Script that deletes directories BUT doesn't delete directories with a specific .txt file
Feb
16
awarded  Teacher
Feb
16
answered awk/sed + replace only the second char with one space