16,281 reputation
65489
bio website shawnjgoff.com
location Tampa, FL
age 33
visits member for 4 years, 1 month
seen 6 hours ago

I've grown up with computers around me my whole life. I started programming when I was a kid, and stuck with it ever since. I came across Linux around 1999 and have enjoyed working with it ever since.

For a job, I get to write software that runs on embedded Linux devices. I do everything from working on low-level drivers to writing shell scripts and even web apps.


Oct
26
comment Strip trailing whitespace from files
Exactly the same way: echo "$@". Using the parameter doesn't change it in any way, so you can reference $@ (or any other parameter: positional, special or not) as many times as you want.
Oct
26
comment Reinstall or repair Network-manager-gnome in Ubuntu lucid lynx 10.04.3 LTS offline
You're likely to end up with problems like this when you add repositories that are for another distribution. If you can't find a ppa for a piece of software for your distro, it may be better to install from source or a .tgz-style package and take care of its dependencies manually.
Oct
25
comment diff where lines are mostly the same but out of order?
Pass them both through sort fist.
Oct
24
comment Why are network interfaces not in /dev like other devices?
I've seen at least one article/rant about how everything in Unix is not a file despite the mantra, and it cites this problem. I can't find it now, but it was probably an article about Plan 9 or GNU Hurd.
Oct
23
comment How can I find all ascii files under one directory that have the word shirt in them? Starting from root
Nice. It won't be faster when there are many binary files, which grep knows how to skip. @norman-gray -print0 and -0 are always necessary for scripts. They live on past the author and can give "wtf" moments when they don't work correctly.
Oct
23
comment How can I find all ascii files under one directory that have the word shirt in them? Starting from root
Yes, @keith-thompson 's suggestion is faster, also because it will stop scanning once it finds just one match.
Oct
23
comment How to report number of files in all subdirectories?
Add -exec echo to your find command - that way it doesn't echo the filename, just a newline.
Oct
23
comment How to report number of files in all subdirectories?
This will report incorrect results if any filename has a newline character in it.
Oct
23
comment How to report number of files in all subdirectories?
This will report incorrect results if any filename has a newline character in it.
Oct
22
comment Changing my default primary GID for every login session
@rozcietrzewiacz As far as I know, adding newgrp to a startup script is the closest you can get without root privileges. If you were the admin of such a system and you wanted to let your users switch between a subset of groups without giving them root privileges, you could write a program to let them do it, and set the setuid bit on the program.
Oct
21
comment Combination of ls, xargs and zcat leads to duplicate file name suffixes?
What happens on your system when you zcat a file that is not compressed?
Oct
21
comment Combination of ls, xargs and zcat leads to duplicate file name suffixes?
You actually can sort by modified time if you use -printf %t (gnu-only) or -exec stat -c '%X' {}\; then pipe it to sort.
Oct
20
comment Limits of SSH multiplexing
I can't answer the questions directly, but can offer some suggestions on tracking down the problem. Since the peer refused the connection, I'd start by looking at the logs on the system you are connecting to. See if sshd gives any errors. If not, increase the LogLevel and try again. If you find a log message that isn't immediately obvious and searching for the phrase doesn't help, you can use grep on the source code. Error messages are frequently surrounded by sets of conditions - one (or some) of them weren't met, and that's why this message came up.
Oct
19
comment Do sleeping processes get the same CPU time?
@rahmu noooo! My beautiful straight sixes! I'll just have to get to sevens now.
Oct
19
comment How to log if an environment variable is unset?
You'll want to grep for ^$VAR= since just ^$VAR can match several variables that start with the same thing. You can also just test $VAR && logger....
Oct
19
comment Install Gvim after vim
@Jeff Not really; I'd install -gtk if you don't have (and don't want) gnome installed. See askubuntu.com/questions/33260/…
Oct
19
comment case-insensitive search of duplicate file-names
@prince-john-wesley No, I only wanted the empty newline from echo. In fact, echo {} breaks it, since filenames can contain newlines, and that is what I'm counting in the next step. -- I just changed it to -printf "\n" to be more straightforward.
Oct
18
comment case-insensitive search of duplicate file-names
@lamcro that should do it.
Oct
18
comment case-insensitive search of duplicate file-names
@lamcro No, Solaris doesn't use GNU's find; I've edited the answer to include a non-GNU solution.
Oct
18
comment case-insensitive search of duplicate file-names
@rozcietrzewiacz, nope! Thanks.