507 reputation
521
bio website
location
age
visits member for 2 years, 3 months
seen Dec 22 at 11:25

Shyy erny anzr - Naqernf Rvonpu


Dec
22
comment Error when running TMUX under CYGWIN
Closely related to this question, which says that the problem might be rooted in the 64-bit version of Cygwin. It is recommended to try the 32-bit version even on an x86_64 system. Oddly enough, a sort of "derivative" of this bug was reported back in 2011 already: comments.gmane.org/gmane.os.cygwin/128288
Dec
19
awarded  Enthusiast
Dec
16
comment Create a binary input file from hdparm's --read-sector option
Well, this is just what I wasn't sure about two weeks ago.
Dec
16
revised arithmetic wiki excerpt
added 213 characters in body
Dec
16
wiki created arithmetic excerpt
Dec
16
suggested approved edit on arithmetic tag wiki excerpt
Dec
16
comment Create a binary input file from hdparm's --read-sector option
Well, the most important thing to me was, that in the hdparm manual (I read it thoroughly several times), there was something explained about hdparm using an extremely low-level approach to read sectors when using --read-sector. So frankly, I wasn't sure (or better: much too skeptical) about whether ddrescue would use a likewise low-level approach or one or more tiers higher. Needless to say that the lowest tier was just good enough to get something useable out of those few corrupt sectors.
Dec
15
comment Flash plugin up to date but Firefox keeps telling me that I have the old version
"Simple script"? I beg to differ. :P I think that for f in $(ps -C firefox -o user=); do will work perfectly enough :) Moreover, when I use your line, I find out that first line is the grep itself, and the firefox line I want is in line #2. So if you do want to go the complicated way, make sure you insert a | grep -v grep somewhere as well.
Dec
15
comment Read-only file system error while accessing the files on Ubuntu
This question is impossible to answer sensibly without knowing what file system it is about you're trying to create your testFolder on. Consider that also NTFS partitions can be accessed from a Linux-type system...
Dec
15
revised Calculate and divide by total with AWK
if we calculate, divide etc. we're doing arithmetic operations. there is already a tag for it afair
Dec
15
comment awk separate columns of 3
@Arcege nit: $ awk -f whatever.awk is not necessary if the shebang #! has already specified /bin/awk -f. In your case, $ ./splitnum.awk filename will work a treat. The gain is: less typing effort.
Dec
15
suggested approved edit on Calculate and divide by total with AWK
Dec
15
comment Calculate and divide by total with AWK
Thanks, very interesting stuff. But do not even think of using this in C! As awk's printf syntax is pretty alike to the C syntax, this looks sooo darn tempting. But C, in contrary, will show itself obdurate here once more (just had to test it! :)) warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’. Trying to run that program even resulted in a segfault...!---So what this post is supposed to say is: don't assume that what you can do in awk would be possible in C as well. awk is WAY more liberal in that respect.
Dec
15
comment Calculate and divide by total with AWK
BTW you need not run it as cat data | ./totals.awk. Consider that awk WANTS a file, so just do a ./totals.awk data (or if you insist, totals.awk < data, in this case it should not matter) instead. Anyways, the gist is: in any case, omit that superfluous cat.
Dec
15
comment Calculate and divide by total with AWK
Yes, but chances are the latter will not be entirely POSIX-compliant then. (From the top of my head though, would have to try it out to be sure, perhaps I'm again confusing it with command substitution ;))
Dec
15
comment Calculate and divide by total with AWK
Just a +1 for not using cat. It always hurts my eyes to see cat "misused" like that. Poor cat! (meow) ;)
Dec
15
comment Proper escaping of double quotations for curl post data?
Just a wild guess, but I seem to remember that in curl the nested quoting works indeed the same way as in alias in bash. For instance, this is one of my many alias lines: alias hdd='lsblk -nio KNAME,MODEL,SIZE,MOUNTPOINT | grep -vi "\(1K\|sd[a-z][1-3]\s\+[0-9]\+,[0-9]G $\|swap\)"'. It's always a battle with these nested ones: one mistake, and you may search for 15 minutes where the "bug" is.
Dec
15
awarded  Peer Pressure
Dec
15
comment bash: What is the difference between these two script variants?
@PM2Ring Many thanks. There is nothing worse I can think of than bash's "error handler" whenever you mistype something (or "inject" something else from other programming languages because you mixed things up again). Those error messages are about as useful as those from several products made by the huge company with the capital M, and in 95% of cases, they will always lead you up the garden path.
Dec
15
comment Killing a shell script running in background
@light94 You are right. It happened frequently here that the jobs command really only displayed the running jobs while in the shell. Once I closed a certain terminal window, the only way to access them was via ps (see above for that). So it's for sure that you're not making this up.