439 reputation
38
bio website sourceforge.net/projects/…
location Northeast
age
visits member for 2 years, 11 months
seen Jul 28 at 6:50

Long time Linux user (currently kubuntu). Use Windows 98, and 7 when I have to. Programmed in many languages, currently using bash and awk for most things. Learning Python.

Have one project on sourceforge:

Duplex printing emulator for non-duplex printers (Linux)


Aug
28
awarded  Yearling
Aug
11
comment Can I configure bash to execute “clear” before every command typed in the console?
Just curious: What's you application for this? Except when I'm debugging programs with a lot of output, I usually want to keep as much as possible on the screen to help me keep track of the context I'm working in.
Aug
10
comment Which extension to use for text files? (Unix/Linux)
Under KDE, dolphin will often appear to use the extension to select an appropriate icon for the file and sometimes the program that displays it. As others have noted, this is dolphin just trying to be helpful in an ambiguous situation, not some rule or convention in Linux.
Aug
10
comment Can I configure bash to execute “clear” before every command typed in the console?
Gilles: I pasted the above into a konsole terminal and the output from each command I subsequently entered got cleared before I could read it. Am I missing something? Also, what happens for this (and the other answer below) if I invoke a multi-line bash script where more than one line (or any line other than the last one) generates interesting output?
Aug
5
answered Archlinux gizmod
Jul
27
comment File is mysteriously empty. Options to recover?
Look in ~/.openoffice.org/3/user/backup/ or ~/.libreoffice.org/3/user/backup/ I wrote a script to clear these directories so that sensitive things I deleted weren't still there.
Jul
27
comment File is mysteriously empty. Options to recover?
@Tim I tried areca about a year ago. It was lovely in theory, but when I ran into problems, there was very little support on the forum and I gave up. Is the user community more lively now?
Jul
14
comment Make `rm` move to trash
Do whatever you want such as the solutions outlined in the answers below, but don't name it rm. As pointed out by others, renaming/repurposing standard commands leaves you vulnerable when you habitually try to use them on other systems, but it also will cause problems for anyone else (perhaps assisting you) using your system/account when unexpected results occur.
Jul
14
comment Can I restrict a user to use special programs?
I'm not adding this as an answer because I haven't tried it in a long time, but you can change the user's login shell (in /etc/passwd, I believe) to run an arbitrary command or script instead of the default that allows them full normal user access. You just have to test your command/script to make sure the user can't break out of it.
Jun
16
comment How to do integer & float calculations, in bash or other languages/frameworks?
As a variation on the bc approach, I added the following function (that I found on stackexchange somewhere) to my .bashrc file. I can just enter calc 2+3 and get 5. ## Command line calculator calc () { bc -l <<< "$@" }
Jun
2
answered How to specify printer paper size in mm instead of inches?
May
25
comment What's the standard for indentation in shell scripts?
+1 for the guide url. It's a good starting point anyway.
May
5
comment What is a simple way to schedule a single event to happen at some time in the future?
+1 for script and for mentioning dzen and notify-send which I had not heard of.
May
5
comment In what order do piped commands run?
And what's cool about this example is that when head gets the one line it needs, it terminates and when grep notices this, it also terminates without doing a bunch of further work for nothing.
May
5
answered KUbuntu 10.04 / Dolphin File Manager: Is there a way to make .desktop files display the filename the same as the NAME= in the metadata?
Apr
20
comment Locate enscript reported non-printable chars
Found another clue here. The trick is running the files through hexdump first and searching the output. Also found some things about using echo with an unescaped $ to pass raw data into grep. Bottom line, I'm not sure your original grep was correct. stackoverflow.com/questions/4180081/linux-binary-grep unix.com/shell-programming-scripting/…
Apr
20
comment Locate enscript reported non-printable chars
Maybe this will provide a clue as to how to handle these. It is not an answer: unix.stackexchange.com/questions/18579/…
Apr
20
comment Substituting strings in a very large file
Linux allows urls to have embedded multiple slashes in paths, so this code may fail if you have any of those. Testing for the whole string, http and all, won't have this problem.
Mar
29
comment Adding a user who can only execute scripts remotely
If you only want the user to be able to execute the commands from your directory (and there aren't too many), you could take the "prog" out of the read above and use a select statement to offer a text menu of choices of those programs and then do the read for the arguments. I would also test this to make sure what happens if you type a bunch of Ctrl-Cs at various points in the script. You may want a trap command in there too.
Mar
4
answered Is swap an anachronism?