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 »

Posts by r~~‭

34 posts
66%
+2 −0
Q&A How to overwrite each line of STDOUT with the next one?

In Bash, you could use the $COLUMNS environment variable to detect the width of your terminal and truncate each line to that length in your sed script. Something like this should work: sed "s/^\(....

posted 3y ago by r~~‭  ·  edited 3y ago by r~~‭

Answer
66%
+2 −0
Q&A How to list the first x files in each directory

Is this what you want? Edit: Credit to Kamil Maciorowski‭ for catching an unsafe interpolation in the previous draft; it will work for non-adversarial inputs but this newer version is safer and a ...

posted 3y ago by r~~‭  ·  edited 3y ago by r~~‭

Answer
66%
+2 −0
Q&A Why does $XDG_DATA_HOME default to ~/.local/share?

I wasn't there two decades ago when the spec was first being developed, but based on other parts of the spec they're clearly attempting to establish a parallel with /usr/local. The intended minimal...

posted 3y ago by r~~‭

Answer
66%
+2 −0
Q&A how to manipulate Gnome's "Top Bar"/"Activities Bar"/"Top Panel" using GDK

That bar is part of GNOME Shell, and user applications don't get to mess around with the shell. You need to look into writing shell extensions to modify that in a general way. One common thing for...

posted 4y ago by r~~‭

Answer
60%
+1 −0
Q&A trap ... ERR, how to get the signal code?

ERR is not a signal, so there is no signal code to get. From man bash: If a sigspec is ERR, the command arg is executed whenever a pipeline (which may consist of a single simple command), a list...

posted 11mo ago by r~~‭

Answer
60%
+1 −0
Q&A Can I interrupt a crashing/frozen Ubuntu desktop?

You might be looking for the Magic SysRq feature, which has many functions. One of the most useful is Alt+SysRq+f, which triggers the kernel's out-of-memory process killer. On Ubuntu, you may need...

posted 1y ago by r~~‭

Answer
60%
+1 −0
Q&A How to use the gitignore file without git(1).

You can fake out git as long as you have some empty Git repository available somewhere. git --git-dir=path-to-empty-repo/.git \ ls-files --others --exclude-standard

posted 2y ago by r~~‭  ·  edited 2y ago by r~~‭

Answer
60%
+1 −0
Q&A Treat underscores as word boundaries in terminal using vim mode

You can't, without patching readline. What counts as a word character is hard-coded in the readline library, as of this writing. See: https://git.savannah.gnu.org/cgit/readline.git/tree/vi_mode...

posted 3y ago by r~~‭

Answer
50%
+1 −1
Q&A How to securely erase data from a thumb (solid state) drive

Answering your question as written, this is a hardware-specific question. Since solid-state storage chips typically keep the details of which cells are being used to write data hidden from the OS, ...

posted 3y ago by r~~‭

Answer