20,900 reputation
34677
bio website
location United States
age
visits member for 3 years, 5 months
seen 3 hours ago

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


Mar
8
comment Need help to make rows into column with awk or sed
@AlanFok What I meant was that the question that you posted has been answered. If that's not what you really wanted to ask, update the question. Don't expect people to read your mind or know what your system looks like.
Mar
8
comment Need help to make rows into column with awk or sed
@AlanFok You should put what you want in the question if you want people to be able to help you.
Mar
7
comment Why does awk do full buffering when reading from a pipe
@dannas -W is not in the POSIX standard for awk. I'm not sure what to do if you need maximum portability.
Mar
7
comment Why does awk do full buffering when reading from a pipe
BashFAQ 009 may be useful.
Mar
7
comment Compiling a C program that defines a function getline by GCC
You may get more answers on stackoverflow. In the meantime, here is a related SO question about overriding function calls in C.
Feb
19
comment Checking if PATH contains $HOME/mydir and adding it if not (all in a script)
@jfgagne There are certainly better and worse ways to do things. The case statement is a shell built-in - it's better for at least two reasons: (1) no external dependencies and (2) it doesn't need to fork a new process (slightly better performance). So far you haven't proved your point as you've only pointed out that using grep can get similar results, but you have not mentioned any advantages of using grep over case.
Feb
18
comment How can I send data to the STDIN of a background process?
It may be better if you describe what exactly you are trying to accomplish, so people can suggest ways to do it. Otherwise, it just sounds like you are looking for ssh host command-list.
Feb
18
comment Checking if PATH contains $HOME/mydir and adding it if not (all in a script)
glennjackman's answer is the more correct way to do this.
Feb
18
comment What's the meaning of the slash in crontab?
/ is a forward slash. \ is a backslash. Forward slashes lean forward. Backslashes lean backwards.
Feb
17
comment Configurable tab-bar, or rich-featured terminal emulator
Have you considered something like screen? I think both fluxbox and compiz can do window tabbing, but whether or not it is worth it to switch is up to you.
Feb
17
comment Uninstalling default VBoxGuestAdditions on Debian
@math4tots hmm that's strange. It's not installed on my system, and it seems unlikely that the installer would behave differently in a VM. Did you get the latest version of guest additions installed correctly at least?
Feb
17
comment Uninstalling default VBoxGuestAdditions on Debian
@math4tots yes you are right. That's what I get for typing without thinking, doh!
Feb
17
comment Why are background jobs started by my shell living longer than the parent shell and controlling terminals?
The question would be less of a duplicate if the title were changed to match its content, which is closer to, "Why are background jobs started by my shell living longer than the parent shell and controlling terminals?"
Feb
17
comment Doubt on the value of PS1 environment variable
And the \[\e]0; ... \a\] part is explained here.
Feb
15
comment Can I search bash history across all users on a server?
+1 for suggesting process accounting instead. History files are really for user convenience and there are no simple ways to make them fool-proof enough for any sort of logging purposes.
Feb
15
comment How to generate a year-quarter date from the command line?
What do you mean by "POSIX date"? It doesn't look like this POSIX date. In fact it looks more like a GNU date.
Feb
15
comment Command line friendly virtual machine
What exactly are you trying to accomplish? Would an ssh server running on the guest do what you want?
Feb
14
comment How to make the terminal display user@machine in bold letters?
Why not use 31 for red? 91 does not seem to be a standard code.
Feb
14
comment Options for .hidden files?
Fixed: for i in ./*.out; do mv "$i" ./."${i#./}"; done I forgot the . in the destination so it would have tried to rename a file to itself. There should be no syntax error, just a logic error in the original.
Feb
14
comment Options for .hidden files?
basename is almost never necessary because simple parameter expansion can do its job. Also, for maximum safety, prefix globs with ./. for i in ./*.out; do mv "$i" ./"${i#./}"; done