965 reputation
11023
bio website
location
age
visits member for 3 years, 3 months
seen Jul 21 at 1:19

Jul
16
comment Is there a web based converter between rwx and the octal version?
Many thanks for that, @nico - here is the same code converted as a perl one-liner, and used in bash: echo 'rwxrwxrw-' | perl -ne 'BEGIN{sub conv{ chomp(my $ins=shift); my $k=0; for(my $i=0;$i<=8;$i++) { my $tmps = ( substr($ins, $i, 1) =~ /[rwx]/ ); $k+= ( $tmps*(2**(8-$i)) ); }; if ($k) { sprintf(" %0o ", $k); } else { "??" ; }; }; } print(conv($_)."\n");' would print "776". Cheers!
Jul
4
comment How to prepend a license header recursively for all .h and .cpp files in a directory
Related (has some Python code examples): language agnostic - Tool for adding license headers to source files? - Stack Overflow
Jul
4
comment The reverse of `tree` - reconstruct file and directory structure from text file contents?
Thanks for that @sim - confirms at least there isn't such tool already existing; cheers!
Jul
1
comment How to install latest catfish in ubuntu 10.04
python3-gobject has become python3-gi in newer ubuntus; the linked python-gobject refers solely to python2.6 (or 2.7), as it was on Lucid.
Jun
23
comment Inserting the command line text before output in stdout (for pipe / redirection)
Thanks for that @mikeserv - the other answer has also a note about a shorter usage on command line, so I accepted that one. Cheers!
Jun
23
comment Inserting the command line text before output in stdout (for pipe / redirection)
Many thanks @terdon - I'll be accepting this, as it looks like it minimizes the amount of typing; I didn't need to differentiate between redirection and piping, so it looks good. Cheers!
Jun
23
comment Tools to inspect local network, and find local IP address of device?
Thanks for the comment, @tink - I forgot to mention, that while local networking is in order, usually I mostly want to look at the cable modem page when I lose the Internet :) So it would be nice with a LAN-based only solution. Internet is back for me now, so I tried your command; but for some reason, the traceroute command gives me "all stars": ` 1 * * *, 2 * * *` up to 30 * * *. Cheers!
Jun
12
comment Achieving hexdump-like format, that includes binary strings, on the command line?
That was neat, @mikeserv - thanks for the edit!
Jun
12
comment Achieving hexdump-like format, that includes binary strings, on the command line?
Thanks for that , @mikeserv - nice to keep this in mind, but it still takes some extra work to get it formatted per line (with offset address into the file etc) as with hexdump. Cheers!
Jun
12
comment Achieving hexdump-like format, that includes binary strings, on the command line?
Many thanks for the answer, @Graeme - I edited your post and added the output; am accepting this for now - but if anyone posts a more convenient approach, I might eventually move the accept. Cheers!
Jun
12
comment Achieving hexdump-like format, that includes binary strings, on the command line?
@0xC0000022L - Just checked xxd with: echo -e '\x00\x01\x02\x03' | xxd -c 2 -b; the presence of the -b switch changes everything to binary string, and so apparently it cannot be "mixed" with hexadecimal.
Jun
12
comment Achieving hexdump-like format, that includes binary strings, on the command line?
Thanks for the comment, @0xC0000022L - yeah, I didn't fully think through that with the endianness :). I did check xxd out, and there is a -b: Switch to bits (binary digits) dump,, but I cannot find an example where that output would be mixed with hex (as I gave an example for in the OP); if someone can post an example for that with xxd, that would be an acceptable answer. Cheers!
Mar
11
comment Custom help / man -like command (for reminders)
Thanks @FaheemMitha - this, with me needing a specific nmcli usage, occurred like a year or more after the last event where I needed the same; I cannot imaging how big should I set the history file, so as to handle needs like this - and even if it was set to that, it would be still tedious to look up something you may have typed a year ago. But it could be an alternative for more frequent events; cheers!
Mar
11
comment Custom help / man -like command (for reminders)
Thanks @SamiLaine - was thinking about that; I am afraid of conflicting names of my text files vs. actual man pages; and then also, wanted to avoid thinking about which man section should these files belong to. But I guess this is as much of a built-in facility as it goes (also related: Where are man pages stored in Ubuntu? - Super User); cheers!
Mar
2
comment Search/grep ftp remote filenames
Neat, wasn't aware of that - many thanks, @SteffenUllrich; cheers!
Mar
2
comment How do I proceed further when my reports of a improper functioning of a gnome component has not met with answers on the respective mailing list
Just a note; as of March 2014; the wiki.gnome.org/NetworkManager/Debugging returns "This page does not exist yet. You can create a new empty page, or use one of the page templates."
Mar
2
comment How to perform GREP on FTP?
Also related: Search Within Files On Remote FTP Site - Stack Overflow
Feb
20
comment Multiple GUI windows in one (GUI applications windows multiplexer/wrapper)
Thanks @Gilles - never heard of Sawfish before, will make sure to check it out; but I am unwilling to make a switch at the moment (though surely at a later stage), which is why I thought an application would work great in the meantime.. Cheers!
Feb
19
comment How to set window size and location of an application on screen via command line?
Also related: Setting the window dimensions of a running application - Unix & Linux Stack Exchange
Feb
19
comment Start window in specific size and location, is there a general tool can do that?
You could also start the application, and then use wmctrl to set window size (see also How to set window size and location of an application on screen via command line? - Unix & Linux Stack Exchange); however, you need a window ID to wmctrl, and I'm not sure what is the best way to get it non-interactively.