Timeline for How do I loop through only directories in bash?
Current License: CC BY-SA 4.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Sep 14, 2021 at 20:25 | comment | added | nezabudka | This is just one of two equivalent options in this instance because there can only be a slash at the end. This is the first thing that came to my mind. | |
| Sep 14, 2021 at 19:48 | comment | added | rubo77 | So why don't you use / then? What else would you want to remove at the end? | |
| Sep 9, 2021 at 5:28 | history | edited | nezabudka | CC BY-SA 4.0 |
deleted 20 characters in body
|
| Sep 9, 2021 at 5:26 | comment | added | nezabudka |
? - matches any single character. It's similar ${i%/}. Removes the trailing slash - the directory indicator. Without this, the -h and -L options in test do not work.
|
|
| Sep 9, 2021 at 0:06 | comment | added | rubo77 |
Can you explain [ -h "${i%?}" ] please?
|
|
| Sep 8, 2021 at 22:00 | history | edited | nezabudka | CC BY-SA 4.0 |
deleted 33 characters in body
|
| Sep 8, 2021 at 21:51 | history | edited | nezabudka | CC BY-SA 4.0 |
deleted 4 characters in body
|
| Sep 8, 2021 at 21:41 | history | edited | nezabudka | CC BY-SA 4.0 |
added 192 characters in body
|
| Sep 8, 2021 at 21:14 | history | answered | nezabudka | CC BY-SA 4.0 |