Reputation
7,338
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
11 21
Newest
 Necromancer
Impact
~791k people reached

Nov
5
answered Self complied version of GCC overwriting package installed version
Oct
11
awarded  Quorum
Oct
5
answered Apache2 permissions issue
Oct
5
comment How to use awk or sed to convert csv diffs into more readable format
you say that the real-life file would have a large number of columns...which implies that there could be differences in the values of any or all of those columns, so a simple three-column output format will not be sufficient.
Oct
5
comment How to write a Shell Script using the condition from a database
assuming that $1 actually contains a valid pg dbname, that should work (but it's good practice to quote all variables including positional parameters - i.e. use "$1" rather than just $1). Also, if you're using a ~/.pgaccess file as I suggested, you won't need -U postgres.
Oct
5
revised Subtracting dates in unix
modified script to be ksh rather than bash
Oct
5
answered Subtracting dates in unix
Oct
5
comment What is the difference in these two bash environments?
see unix.stackexchange.com/questions/29608/… and take note of what it says about passing arguments to the interpreter. IMO using /usr/bin/env like this is an abuse of the env program perpetrated mostly by the python community because they can't manage interpreter and library versioning properly.
Oct
5
answered How to write a Shell Script using the condition from a database
Oct
5
comment run x and getty on the same virtual console?
I used to use mrxvt until about a year ago because it was many times faster than any of the libvte based terminals (gnome-terminal, roxterm, etc). I gave it up because of lack of unicode support and switched to roxterm (IMO, the least bad of the libvte terms).
Oct
5
comment Resize an extended partition to the whole drive
or since queueoverflow mentioned ubuntu, just run apt-get install gparted and then sudo gparted
Oct
5
comment Resize an extended partition to the whole drive
It can be difficult to find a free download of Parted Magic - the only download link on that site is behind a $5 paypal "donation". I have found Parted Magic on various bit-torrent sites, but I'd recommend the GParted Live CD instead gparted.sourceforge.net/livecd.php
Oct
4
comment Rename multiple files, sub directories, and insert characters at specific location on OSX
typo in finddetph - should be finddepth?
Oct
4
comment Why do *nix filesystems support file names with newlines?
Ctrl-O can mess up your tty, and Ctrl-G can make you want to strangle someone. IMO all control characters are problematic.
Oct
4
comment My Debian freezes
can you post the output of lspci | grep VGA | cut -d' ' -f1 | xargs -n1 lspci -v -s. That will tell us what video card(s) and driver(s) you have.
Oct
4
comment Monitor does not switch off
cool, nice to see that my suggestion worked. thanks for coming back and letting us know the result.
Oct
4
comment Can I label a disk device rather than a partition?
no problem, as you said it didn't directly answer the question. but it was useful and hopefully someone else will find it useful in future. btw, here's an improved version of the alias: alias list_disks='find /dev/disk/by-id/ -iname scsi-* -o -iname usb-* | grep -v -- -part | while read disk ; do echo $(basename $(readlink $disk)) $(basename $disk); done | sed -re "s/(usb|scsi)-// ; s/(SATA|Generic)_//" | sort'. it finds usb disks as well and gets rid of extraneous data in the output.
Oct
4
comment Why do *nix filesystems support file names with newlines?
Yes, i understand WHY newlines are legitimate characters in a filename. I just don't think that there's any good reason for them to be allowed, and certainly no good reason to use them. It's possible to login as root to run X and all the usual user GUI apps, but it's a bad idea to do that. same with newlines in filenames - legit but stupid.
Oct
4
comment Why do *nix filesystems support file names with newlines?
worse, an extremely common file format (i.e. "one filename/item per line, separated by newlines") is made unreliable by the presence of newlines in filenames. There's not even a reliable way to convert that format to NUL-separated. All you can do is hope/assume that your users are relatively sane and haven't used \n in their filenames.
Oct
4
comment Why do *nix filesystems support file names with newlines?
There's no good reason to allow newlines in filenames, but unfortunately we're stuck with them..too late to change now. And the Robustness Principle is subverted because the presence of \n in filenames leads to more fragile scripts as most shell programmers even find dealing with spaces in filenames to be difficult and most of the reset only know about find ... -print0 and xargs -0 (and don't realise, e.g., you can tell bash's built-in read to use NUL as a delimiter with -d $'\0', or that many GNU tools have -0, -z or -Z options for handling NUL-terminated stdin)