Activity for AdminBeeā
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Comment | Post #288562 |
Be careful, `+` is [ERE syntax](https://en.wikipedia.org/wiki/Regular_expression#POSIX_basic_and_extended). However, when invoked without the `-E` flag, `sed` will use BRE, which doesn't know `+`. There, you would need to use explicit range indicators as in `\{1,\}` (and here, the `\` would actually ... (more) |
— | almost 2 years ago |
Comment | Post #288554 |
Plus, performing smaller updates on a regular basis is less likely to break the installation, as opposed to one large update. (more) |
— | almost 2 years ago |
Edit | Post #288562 | Initial revision | — | almost 2 years ago |
Answer | — |
A: Can I enter raw strings in fish to avoid escaping regexes for sed? It is not the most elegant solution, but you may be able to use the `string escape` function of `fish`, as in: ```lang-shell echo abc | sed -E (string escape 's/b+/X/') ``` This would still escape the special characters, but in a "hidden" way - the user-visible RegEx is not cluttered with backsla... (more) |
— | almost 2 years ago |
Comment | Post #288541 |
As for adding a tag description: [this help page](https://linux.codidact.com/abilities/edit_tags) explains that to earn this ability you need a minimum of 76 approved edit suggestions. If I read your user profile correctly, you only have 11 edits so far, so this is likely the reason you can't (yet). (more) |
— | almost 2 years ago |
Suggested Edit | Post #288436 |
Suggested edit: Minor improvement to formatting (all text belonging to one bullet stays indented, code formatting for literal command and option names), use more accessible names for the example programs in question (more) |
helpful | almost 2 years ago |
Edit | Post #288311 |
Post edited: Minor clarification, as "print0" is not a POSIX-mandated option for find |
— | almost 2 years ago |
Comment | Post #288401 |
The Wikipedia page on Filenames has a nice [comparison table](https://en.wikipedia.org/wiki/Filename#Comparison_of_filename_limitations) on which characters are allowed on various file systems. (more) |
— | almost 2 years ago |
Suggested Edit | Post #288311 |
Suggested edit: Minor clarification, as "print0" is not a POSIX-mandated option for find (more) |
helpful | almost 2 years ago |
Edit | Post #288392 |
Post edited: |
— | almost 2 years ago |
Edit | Post #288392 |
Post edited: Add clarification |
— | almost 2 years ago |
Edit | Post #288392 | Initial revision | — | almost 2 years ago |
Answer | — |
A: How to get number of files in directory A solution I often use (and which is ultimately a variation of the `find`-based approach in the answer by Canina) also uses `find`, but only prints a single `.` per file: ```lang-bash find . -maxdepth 1 -type f -printf '.' | wc -m ``` It then uses the `-m` flag of `wc` to print the number of char... (more) |
— | almost 2 years ago |
Comment | Post #288311 |
You may want to add a warning that parsing the output of `find` is strongly discouraged, because it will stumble on filenames with non-standard characters, which can actually include the new-line (although the most common pitfall in these scenarios is the space character). The `parallel` approach usi... (more) |
— | almost 2 years ago |
- ← Previous
- 1
- 2
- Next →