5,290 reputation
11726
bio website mikelward.com
location Mountain View, CA
age 34
visits member for 5 years, 2 months
seen Dec 12 at 15:17

Computer guy from Australia now living in the US.

Part sysadmin, part developer, part web developer.

My name is pronounced like "Michael".


Feb
9
comment Automating the “sudo su - user” command
Try using expect. man expect for details.
Feb
9
comment Bash - array element exists
The problem was the missing spaces in [ $i=$action ]. Every part between [ and ] needs to be separated by spaces, because [ is a command that takes three arguments when using =.
Feb
9
comment Bash - array element exists
Hang on. [ $i=$action ] needs to have spaces like this: [ $i = $action ]. Your original post had spaces.
Feb
9
comment Bash - array element exists
Are you sure that is the script you are running? Are you typing wan27 or ./wan27? What does type wan27 say?
Feb
9
comment Bash - array element exists
Then you've got another bug somewhere else. Is that the whole code or is there more? Are there any errors? Maybe you need to change the first line from #!/bin/sh to #!/bin/bash?
Feb
9
comment Unix: How to unsplit in screen
Do you want to maximize one screen or close one screen?
Feb
8
comment is it possible to estimate the death time of a hdd?
Well, I could provide installation instructions for every possible platform, but that would be going over the top. The OP didn't say what platform they were using, so I think they can just follow the Wikipedia link or Google it. ;-)
Feb
8
comment is it possible to estimate the death time of a hdd?
Yes, apt-get assumes Debian/Ubuntu, otherwise it's yum install... or urpmi ... or pacman ... or emerge ... or yast2 ... etc.
Feb
8
comment Am I using sed properly to perform this conditional replace? Is there a better way?
This way will be slower because it makes multiple passes over old.file.
Feb
8
comment Am I using sed properly to perform this conditional replace? Is there a better way?
Yeah, I figured that bit out, I've just never thought to use it like that before. Thanks for teaching me something. Again. ;-)
Feb
8
comment Am I using sed properly to perform this conditional replace? Is there a better way?
Nice! Didn't know awk handled multiple input files like that.
Feb
8
comment Am I using sed properly to perform this conditional replace? Is there a better way?
Nevermind, it does seem to work. Sorry.
Feb
8
comment Am I using sed properly to perform this conditional replace? Is there a better way?
Can you use $1 as a left hand side in Awk? I don't think you can.
Feb
4
comment Trying to remove the first column of a document
That will only remove the first character. I think the OP wants to remove everything up to the first tab.
Feb
4
comment Trying to remove the first column of a document
I think there should be a : at the start of the command.
Feb
4
comment What is the difference between “used space”, “size” and “size on disk”?
Not sure. Perhaps system restore reserves some?
Feb
3
comment Automatic insertion of current date and time in alphabetic form
MMM for short month or MMMM for full month. See autohotkey.com/docs/commands/FormatTime.htm
Feb
2
comment Remove Pictures Entry from Start Menu
Looks like a bug/limitation to me. What happens if you change from Windows Classic theme to Windows Standard under the Appearance control panel?
Feb
2
comment How to replace multiple spaces by one tab
The OP said the number of spaces was variable, so I don't think this solution will work.
Feb
2
comment undefined reference to `glib_major_version'
Is this your own code, or someone else's? Does it have a ./configure script? You need to show us what leads up to the error, e.g. what command you are running.