780 reputation
625
bio website
location
age
visits member for 2 years, 11 months
seen Dec 2 '13 at 5:05

Apr
4
comment unzip file, which directory was created?
Evan's solution is more direct: extracts and parses out the dir name.. (although your idea is good, and the basis for Evan's solution.. for this - I am upvoting with thanks..)
Apr
4
comment unzip file, which directory was created?
Thanks! :) I like the -m1 on grep and I did not know about cut printing to the end via -fN- (omitting last field number). You taught me something! For this -> upvote! Have you not used just one tool (e.g. awk) because 1. grep and cut are more widespread than awk and 2. you find what you wrote more "readable"? I'd like to hear your rationale, since one could concoct a one-liner, like so:stackoverflow.com/questions/15776352 PS: you don't need the quotes, no word-splitting in bash at variable assignment time. v=$(echo a b) is the same as v="$(echo a b)"
Apr
2
comment Reading Linux distribution name from filesystem or command
Yes! It's a dup!
Apr
2
comment head command options and reading man files
Thanks for answering my question, you also taught me some more in the process, I appreciate it.
Apr
2
comment head command options and reading man files
I guess another point to learn is: some options fall out of fashion, get deprecated and are actively hidden/deprecated so that new users (like me) will avoid them. You know what I think would be better than this hiding (not putting in plain sight) approach? Just show the option and say: don't use this - it may not be there in a future version. I would have been less confused. Probably just me though.
Apr
2
comment head command options and reading man files
So the answer to one of the points above is: sometimes look into the info of the command after reading the --help and man..
Apr
2
comment head command options and reading man files
And by doing so, succumb to the hopelessness of the dev/user divide, plunging into a life of pessimism and psycho-active tablets. There must be hope beyond browsing the source!
Apr
2
comment head command options and reading man files
head -2 is synonym to head -n 2, why? Where does it say so in the manual? head -3 is synonym to head -n 3, etc. This being the case but not being explicitly documented has a feel of "black magic"/"secret lore".. ;)
Apr
1
comment ping timeout differences between OS X and Linux/other OSs
Precise timeout: so that I know 100 hosts will take at most 100 seconds. Bash command autocompletion: I have my functions all starting with my_function_ so that I can tab-complete them and have the standard options (in this case -c 1) auto-selected. Readable is a matter of personal taste: for functions I define with many options "pre-selected" I find reading the function name more "natural language like" than ping -o1 -o2 -o3 -o4..
Apr
1
comment scp and compress at the same time, no intermediate save
I think that 7z and tar are a very powerful combination, I get with them better savings than with other compression algorithms. I am sure new and better ones will replace 7z.. but I don't understand why you would be against using the pair "in principle".. am I missing something?
Apr
1
comment ping timeout differences between OS X and Linux/other OSs
why have that function? 1. no stdout output; 2. precise timeout, indep. from the platform (predictable wait on batch execution) 3. can use auto-completion and is more readable 4. in a script, I can add logging of unavailable hosts by editing a single func def
Apr
1
comment ping timeout differences between OS X and Linux/other OSs
Why would you not use that function?
Mar
30
comment scp and compress at the same time, no intermediate save
Thanks! I am going to accept this great answer but please, add a full, stand-alone command line that uses both rsync and 7za, with final output to the remote filesystem. I liked -z but I would like to decouple the compression stage so.. how would I use rsync in that case, please?
Mar
30
comment Human readable system memory reading crom CLI?
It is, certainly, more precise to display it as so.. no doubt about that.. probably the "humans" this is intended for are still aware of the issues you raise.. (I had not thought of that).
Mar
29
comment Human readable system memory reading crom CLI?
I did not know free had a (nice) -h switch. Thanks. Very interesting how free deems 4.0G (which is what I get) more human friendly than 4 GB. "Mum, I'm hungry, I'd like 1.0 apple, please." If this is the best we have on Linux, I should probably just parse the number out and replace G with GB myself.. Very rarely do we see HDDs, for example, advertised as "320G" rather than "320 GB". :(
Mar
29
comment Human readable system memory reading crom CLI?
@Patrick: I dislike OS X when comparing it to Linux!
Mar
29
comment Grep end regex matching
This is the best I have found anywhere. The -F to include both the colon and the space trims the rest of the line already, in one go. Very compact, exactly right.. LIKE!
Mar
29
comment Grep end regex matching
Does not capture the unit of measure, in that case GB, which was desirable.. perhaps a capture "from field 2 to NF"? How would you write that?
Mar
29
comment Hardware and software inventorying
The cookbooks look amazing. I know no Ruby though and some things.. I found difficult. Puppet sounds more "natural" to me, would you advise against it? Why?
Mar
28
comment Hardware and software inventorying
Is it designed to work well in terms of respecting people's privacy?