Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

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)
over 1 year 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)
over 1 year ago
Edit Post #288562 Initial revision over 1 year 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)
over 1 year 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)
over 1 year 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 over 1 year ago
Edit Post #288311 Post edited:
Minor clarification, as "print0" is not a POSIX-mandated option for find
over 1 year 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)
over 1 year ago
Suggested Edit Post #288311 Suggested edit:
Minor clarification, as "print0" is not a POSIX-mandated option for find
(more)
helpful over 1 year ago
Edit Post #288392 Post edited:
over 1 year ago
Edit Post #288392 Post edited:
Add clarification
over 1 year ago
Edit Post #288392 Initial revision over 1 year 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)
over 1 year 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)
over 1 year ago