489 reputation
39
bio website sourceforge.net/projects/…
location Northeast
age
visits member for 3 years, 1 month
seen Oct 18 at 2:51

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
10
revised Why does this 'at' command not print to the standard output?
put last line of script into the code box where it belongs
Aug
7
comment Why not use “which”? What to use then?
@Rob and Stephane. I stand corrected about csh still being in widespread use. Your summary helps a lot. From the rest of your answer, it appears that it's just plain complicated and a simple answer would not have sufficed.
Aug
3
comment Why not use “which”? What to use then?
I've seen Stephane provide a lot of great answers to other questions. Although this answer probably has the right information in it, I was tempted to down vote it because it totally confused me. e.g. Does anyone use csh any more? Why cover it?
Jul
19
answered Why does this 'at' command not print to the standard output?
Jul
5
comment What are the differences between most, more and less?
In the special case of the man command, you can set the PAGER environment variable to any one of these pagers or to anything else that works to use as the pager for man pages. Here's one I wrote that uses your favorite browser as a pager so you don't have to use a new set of key bindings. dl.dropbox.com/u/54584985/kman
Jul
5
comment What are the differences between most, more and less?
@AlberteRomero That's it, more or less, at least most-ly,. LOL I really like the horizonital scroll in most.
Jul
1
comment Can I configure bash to execute “clear” before every command typed in the console?
Just for completeness, trap '' debug turns this thing off again (two single quotes).
Jul
1
comment Can I configure bash to execute “clear” before every command typed in the console?
@JamesAndino That made it work (and I see Giles added it to his answer.)
Jun
14
comment When to use redirection to stderr in shell scripts
@glts programs are always getting modified and improved. While the scripts you mention don't output any data now, they might later or you might use them as a starting points for other scripts that do. If you follow the convention to start with, you'll get a lot less surprises later. OTOH, if you just want to save the output to a file, then you have to redirect stderr, so it's a tradeoff like everything else.
Jun
7
comment Move files and delete directories with rsync?
If you don't get an answer here, try posting on the rsync list. They're very helpful. lists.samba.org/mailman/listinfo/rsync
Jun
7
comment How to recover from a chmod -R 000 /bin?
Glad it's fixed. I'm missing something. If it's a vm, then it's just one big file to the host system, isn't it? How do you mount anything inside it to do the repairs? (I understand how to do this on a non-vm system.)
May
11
comment Is it common to split larger script into multiple scripts and source them in the main script?
I have run into the same problem. I have a moderately large bash project sourceforge.net/projects/duplexpr . Currently, each script is self contained, but I am thinking of moving all the common functions to a separate file(s) and including them where needed to eliminate having to update them in multiple places. In general, I think it would be better to just call each successive script rather than source it. It makes running the parts independently possible. Then, you have to pass variables as arguments or in parameter files (or you can just export them if you don't want standalone.)
May
11
comment Can bash case statements cascade?
+1 Cool. Never noticed that option before.
Apr
5
comment How do you send command line apps directly to the background?
If your task requires your input "before disappearing" into the background, you can use tools like zenity or yad (if you like guis). They can still send and receive output from the background. I'm sure that playing with pipes and devices would also get you access to the console from background, but I'm not sure how to do it.
Apr
5
comment Why doesn't “sudo su” in a shell script run the rest of the script as root?
If using su or sudo was "persistent" in bash (or anywhere else) it would create many more problems than it solved. You need to do the minimum possible as root for safety and security. The main point of having su and sudo (other than security!) is to make you think carefully about what needs root privileges.
Apr
5
comment Why doesn't “sudo su” in a shell script run the rest of the script as root?
@JoelDavis - I've spent many hours dancing with embedded blanks. Using "$@" for argument lists helps. Using eval for commands helps a lot too. The newest trick someone showed me is to put all your arguments into an array and then reference the array as "$ARRAY[@]". That also helps make blanks behave. To detail all of this would require a separate question.
Apr
5
answered What's the most appropriate directory where to place files shared between users?
Apr
5
comment Is there a way to prevent the creation of a given file?
I was wondering where that file came from!
Mar
18
comment Securely reading and parsing a string from a parameter or file in bash
I think you're right. I need to go back and do some more testing to see exactly what works and what doesn't.
Mar
18
comment Securely reading and parsing a string from a parameter or file in bash
@UlrichDangel - You're right. It doesn't get expanded in that case. I'll have to do some more testing to see how things like this actually work. Maybe it's not as bad as I thought.