Reputation
15,757
Top tag
Next privilege 20,000 Rep.
Access 'trusted user' tools
Badges
17 47
Newest
 Nice Answer
Impact
~1.1m people reached

Dec
5
comment awk print out file with a row number
do you have to use non-standard prompts here? especially one that looks like a bolded redirection operator? I'm sure you think it looks pretty but please stick to the convention of $ for non-root prompt, # for root prompt, and % for csh.
Dec
5
reviewed No Action Needed Grub Rescue after installing Elementary OS Freya
Dec
5
revised Find last occurence of string in multiple files
numeric sort, duh.
Dec
5
revised Find last occurence of string in multiple files
used gsub to remove leading spaces after clearing first two fields.
Dec
5
revised Find last occurence of string in multiple files
forgot to specify `:` as field-sep.
Dec
5
revised Find last occurence of string in multiple files
got rid of xargs, not needed.
Dec
5
answered Find last occurence of string in multiple files
Dec
5
comment Install Debian safely without destroying Windows
as for how to tell: since /dev/sda5 is the only partition even approximately close to the size of your empty D: partition, it's the only one that it can be.
Dec
5
comment Install Debian safely without destroying Windows
The difference is that some software shows disk sizes in powers-of-two (where 1kB is 1024, 1MB is 1048576 bytes etc - technically, these are now called kibibytes and mebibytes), and some show disk sizes in powers-of-10 (1KB = 1000, 1MB=1000000). The difference is small but adds up to a lot when you are talking about gigabytes/gibibytes of data. See en.wikipedia.org/wiki/Units_of_information
Dec
5
comment sort behaves weirdly with scientific notation
what OS & Version is it? Linux? Mac? Solaris? FreeBSD? Other?
Dec
5
revised sort behaves weirdly with scientific notation
fixed formatting
Dec
5
comment syntax error near unexpected token `fi'
Alternatively, run the sql query just once (instead of 3 times), capture the output in a variable with $(), and printf the output to different files depending on exit status.
Dec
5
comment Command line tool to check when a URL was updated?
Note, though, that Last-Modified headers are completely useless on many sites because the pages are generated dynamically from a database and will always return a LM header of approximately now. This is often done deliberately as a cache-busting technique and to force re-fetches (and thus marketable page views) when the client requests the page with an If-Modified-Since request header.
Dec
5
reviewed Leave Open No dpkg or apt, no make or gcc. Need to install them all
Dec
5
reviewed Leave Open Acces file structure Linux router/modem
Dec
5
comment Sed entire word with when replacing single letters, with BSD sed?
No, it doesn't. y// runs once over the entire input. Your series of s///g commands runs one after the other in sequence. First changing all cs to ks, then l to i then a to e then y to i and finally k to o (thus changing all the ks that used to be c).
Dec
5
reviewed No Action Needed No dpkg or apt, no make or gcc. Need to install them all
Dec
5
reviewed Reviewed Take output of array, and put into new array (perl script)
Dec
5
comment Take output of array, and put into new array (perl script)
why not just do something like: ssh -q $workstation "count=$(ls /logs/$workstation | wc -l) ; [ $count -gt 0 ] && /tools/log_remover /logs/$workstation"? or install pdsh (Parallel Distributed Shell) from computing.llnl.gov/linux/pdsh.html - if you're writing for-loop wrappers around ssh then pdsh is exactly what you need.
Dec
5
comment Run bash script from curl failed while from file succeeded
No, actually, it's about training users to do things they shouldn't do, things that they should have more sense than to do. You're encouraging them to indulge in dangerous behaviour and teaching them that it's perfectly normal and OK to do that.