1,472 reputation
414
bio website
location Vancouver, Canada
age
visits member for 2 years
seen yesterday

Moderator pro tem for http://codereview.stackexchange.com


Apr
11
comment Why isn't there any shell command to create files?
An illustration of the Unix tendency to generalize is the fact that the command to display the contents of a file is called cat. Why have a command to display one file, when you could make one command to concatenate multiple files to standard output?
Apr
5
comment Tell fs to free space from deleted files NOW
Superfluous use of cat to truncate. In Bourne shell, just > /proc/3446/fd/128 will do.
Jan
10
comment Why I can't escape spaces on a bash script?
Furthermore, if you double-quote everything consistently, you don't need the backslash before the space.
Dec
22
comment How to add zero (0) in blanks in a big file (example file is below)
@HåkonHægland Amended, thanks!
Dec
22
comment How to add zero (0) in blanks in a big file (example file is below)
Please clarify the question by posting what your desired output should look like.
Dec
22
comment How to add zero (0) in blanks in a big file (example file is below)
I interpret the task be replacing empty fields (i.e. consecutive tabs or a tab at the end of the line) with 0.
Dec
22
comment How to add zero (0) in blanks in a big file (example file is below)
I don't see how this solution should work at all. It just indiscriminately replaces tabs with zeros.
Dec
3
comment How to download all the e-mail messages from POP3 server to a single text file with mailx?
IMAP does support multiple folders. Use fetchmail --folder Sent (or fetchmail INBOX.Sent with some IMAP servers' folder layout).
Dec
2
comment How to download all the e-mail messages from POP3 server to a single text file with mailx?
POP3 has no concept of any folder other than Inbox. Your Sent and Deleted folders probably reside locally on the client.
Nov
26
comment How can I determine a file's conventional filename extension
grep | awk can usually be done using awk alone.
Nov
8
comment How can I find out where the firefox bin is?
While locate exists on OS X, the locatedb database is not built by default. Instead, users would probably prefer mdfind, since Spotlight indexing is enabled out-of-the-box.
Nov
8
comment How can I find out where the firefox bin is?
@JosephR. Technically true, but not useful. For one, type assumes that firefox is already in the $PATH, which it wouldn't be on OS X. The question is, where would you find it, which leads back to the original question. See my osx-relevant answer.
Nov
8
comment How can I find out where the firefox bin is?
Not really applicable to osx.
Nov
8
comment Simple Bash Script
It could be done, but this kind of problem requires too much manipulation to be solved comfortably using shell scripts, especially for a beginner. Try a programming language such as Python, Ruby, or Perl.
Oct
17
comment Bash : compare two strings with space
How about if you use if [ "$TEST" = "ON Master" ]; then ... instead? (What version of Bash? I can't reproduce your problem on Bash 3.2.48 or 4.1.5.)
Oct
1
comment What does size of a directory mean in output of 'ls -l' command?
@ЯрославРахматуллин A directory entry consists of an inode number and a filename.
Sep
30
comment How to download all the e-mail messages from POP3 server to a single text file with mailx?
POP3 only supports an Inbox, with no additional folders on the server. (RFC 1939 Sec 8)
Sep
18
comment Sed script inserting and appending in wrong place only in one particular place
What is your desired result?
Sep
18
comment How to find creation date of file?
Linux doesn't keep track of the creation time since it is not required by POSIX. However, Mac OS X does with the HFS filesystem — look under "birth time" in stat(1).
Sep
17
comment Feed OpenOffice via STDIN
Well, you could run ooffice as a server that accepts remote control commands over a TCP socket to create a spreadsheet, but that may be more complicated than what you had in mind. You can also create a spreadsheet in Python using a template.