20,870 reputation
34677
bio website
location United States
age
visits member for 3 years, 4 months
seen 1 hour ago

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


Jul
19
comment Bash: kill background jobs
for pid in $(jobs -p); do kill $pid; done?
Jul
19
comment Bash: kill background jobs
kill $(jobs -p) seems easier.
Jul
19
revised Where are command line arguments (e.g. 'some.text') actually passed to?
edited tags; edited title
Jul
19
revised Openbox keybindings not taking effect after --reconfigure or restart
added 1 characters in body
Jul
19
revised Difference between “echo $SHELL” and “which bash”
added 275 characters in body
Jul
19
answered Difference between “echo $SHELL” and “which bash”
Jul
19
revised Why does find's -exec only executes on one result?
deleted 6 characters in body
Jul
19
comment Difference between “echo $SHELL” and “which bash”
Also, neither of the two answers are correct about $SHELL. It does not necessarily reflect the currently running shell. Instead, $SHELL is the user's preferred shell, which is typically the one set in /etc/passwd. If you start a different shell after logging in, you can not necessarily expect $SHELL to match the current shell anymore.
Jul
19
comment Difference between “echo $SHELL” and “which bash”
A good thing to note is that which is not really a useful command.
Jul
19
comment Why does find's -exec only executes on one result?
@gasan Yes you can
Jul
19
comment Why does find's -exec only executes on one result?
3 comments in one: -o is much more portable than -or, and means the same thing. I assume the -exec echo is for the sake of illustrating -exec only, since -print would be much better otherwise. For safety reasons, avoid piping find to xargs unless you have find -print0 | xargs -0. If you don't have that, use -exec \; or -exec + instead.
Jul
19
answered Why does find's -exec only executes on one result?
Jul
19
answered How to properly run “top” command through SSH?
Jul
18
comment what do you mean by interactive shell?
It is possible to run a shell as a non-interactive login shell.
Jul
18
comment Does the position of partition on disk affect speed?
Increasing usage of LVM and RAID might render this question moot.
Jul
18
comment Select lines using ranges in Vim?
How about 10GV12G?
Jul
17
comment Perl script, do cd on terminal
What are you really trying to do?
Jul
17
comment Where to start creating CLI applications?
Once you have a design for the next greatest thing since vim and emacs, you'll have to get into the implementation details. You'll need to familiarize yourself with terminal emulators and tty's and the workings of termcap/terminfo and/or the curses libraries. All of this stuff is specific to writing a text editor. If you wanted to do something else, there'd be a whole different set of concerns. With that said, most Unix applications and libraries are written in C, so if you want to write CLI apps in the future, learning C won't be a waste of your time.
Jul
17
comment Where to start creating CLI applications?
@ACarter like I said above, that question is much too general, and would likely get closed. The problem is programs are designed to do something. You can't ask "How do I program foo?" and leave out the "foo", because that is the most important part. The demands and requirements of the problem will inform and sometimes dictate your approach, including what language you pick. E.g.: nano is a text editor. If you want to write a text editor, you have to start by designing a text editor (mostly UI stuff, doesn't involve coding at all). (continued due to char limit ...)
Jul
17
comment Run unix command precisely at very short intervals WITHOUT accumulating time lag over time
@hhaamu What is ugly about it? General purpose OS's on PC's are not designed for very precise timing-critical operations, so what more can you expect? If you want "elegant" and absolutely precise timing, you'd have to use a different CPU scheduler, or switch to a real time kernel, or use dedicated hardware, etc. This is a perfectly legitimate solution and I see no reason for any downvotes. It's certainly an improvement on the one that only had the "run in background" without the periodic re-sync'ing via cron.