18,035 reputation
13664
bio website
location United States
age
visits member for 2 years, 8 months
seen 7 hours ago

Debian user, GNU/Linux enthusiast, FLOSS supporter, hobby developer.


Jan
17
comment What are the advantages of the Unix file system structure
@fluffy Separate filesystems offer slightly stronger separation, but that point is partially moot as it is not possible to separate /bin, /etc, from /.
Jan
17
comment Multiple similar entries in ssh config
It appears the %h feature appeared in release 5.6 of OpenSSH. I was wondering why I hadn't seen it before - the version in Debian Squeeze is 5.5.
Jan
17
comment Multiple similar entries in ssh config
@user27915816 Yes, you are right, there is no way to do "templates" as far as I know. The best you can do is separate out the constant lines into a single Host * entry, and have a separate entry for each Host XXX that consists only of the parts that vary (i.e. the Hostname XXX.YYY.ZZZ line).
Jan
17
comment Recursive find that does not find hidden files or recurse into hidden dirs
Where are you adding -type f? I'd put it between -o and -print.
Jan
16
comment Multiline shell script comments - how does this work?
That single-quote commenting method doesn't work on any section of script that itself uses single-quotes. And if you are using quotes anywhere near as much as you should, that means you'll have legitimate single quotes sprinkled all throughout the script. It is so much simpler to just use any decent editor that lets you do block linewise comments.
Dec
21
comment Why is vi apparently broken (viminfo error E576), and how can I fix it?
Is your ~/.viminfo corrupt? Try moving it elsewhere and see if the problem returns. Keep in mind many systems that provide vim simply provide vi as a symlink to vim.
Dec
20
comment Is there any way to test out PS1 Bash Prompts before committing them?
A web tool sounds like even more of a pain than starting a new shell, unless you want to play around with bash when not on a Unix machine. Is that your goal (a web-based bash)?
Dec
20
comment Is there any way to test out PS1 Bash Prompts before committing them?
Define "commit". The easiest way for me is to just start a new shell. Then if I screw it up I can just exit it and no permanent changes have been made.
Dec
20
comment how to add a description in footer
As @ChrisDown has said, just go with a version control system. No need to reinvent existing, sophisticated wheels crudely (it takes a lot of time to implement an efficient and robust VCS).
Dec
20
comment how to add a description in footer
You need to be more specific about what exactly you are trying to do. If you just want revision control there are many existing tools that already exist for that, although some initial learning curve overhead might be required.
Dec
20
comment echo vs <<<, or Useless Use of echo in Bash Award?
@Random832 Indeed, the site doesn't allow comments to be edited after 5 minutes and I was too lazy to delete my original comment and repost. The target of the "To clarify" bit in my 2nd comment was my first comment.
Dec
20
comment echo vs <<<, or Useless Use of echo in Bash Award?
@Random832 Replacing cat with grep doesn't change anything about what I said above. Please reread my last comment, which doesn't actually mention cat at all. The OP thinks he is comparing heredocs vs redirection, when he is actually comparing heredocs and pipes.
Dec
20
comment echo vs <<<, or Useless Use of echo in Bash Award?
To clarify, you aren't actually measuring herestring / heredoc vs redirection, since the same redirection is present in all 3 examples (> /dev/null). You are measuring single-process herestring / heredoc vs a 2-process pipe, and all that this exercise has demonstrated is that the pipe is slower, which is not a surprising result.
Dec
20
comment echo vs <<<, or Useless Use of echo in Bash Award?
What is the purpose of echo | cat besides UUOC?
Dec
19
comment What fast UI mechanisms for page scrolling exist for desktop Linux users?
I actually switched to a scroll-wheel-less trackball mouse a while ago so all of this is recollection. I'd probably call it "middle mouse scrolling". If I remember correctly, paste only triggered on a simple click, scrolling happened if you held the button down and moved the mouse around. I might have had some settings in my xorg.conf that helped (I tend to copy over my old xorg.conf customizations to new installs so I don't remember exactly). If you are using GNOME try poking around in your mouse preferences and see if there's anything there.
Dec
19
comment What fast UI mechanisms for page scrolling exist for desktop Linux users?
You call "holding down middle mouse and moving the mouse" "Windows-style" scrolling but I was never aware that there was anything Windows-specific about it. I actually had no idea what you meant by "Windows-style" before I read through your question carefully. You may want to edit your question to use a more enlightening term as I doubt many other people on this site will know what you mean. As far as I can remember that was fairly standard behavior even on Linux - it's probably just a matter of mouse configuration and whether holding down the mouse wheel registers as middle mouse button.
Dec
19
comment .bashrc overwritten but still sourced — how can it be recovered?
You can save your current settings but if your .bashrc had any logic in it that depended on local variables like host, user, etc. that is probably unrecoverable. The real answer is to restore from your most recent backup. You do have a recent backup right?
Dec
18
comment Remove large chunks from json using vim
@DeerHunter Don't chisels usually require hammers to provide force? :P
Dec
18
comment Remove large chunks from json using vim
@ChrisJohnsen Yes that would work. The reason I didn't use it is because it has the risk of deleting an extra line when there is a bare {} block, if such a block existed (probably not).
Dec
17
comment Remove large chunks from json using vim
This is a clever and novel approach. You should mention that it requires the line offset of the pattern line to be consistent within its "block" though.