Computing desk | ||
---|---|---|
< June 28 | << May | June | Jul >> | June 30 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
Can anyone point out what's wrong with this bit of Bash script? I've been staring at it for a while now, and can't see the problem.
if [ "$type" == "d" ]; then echo DEV; elif [ "$type" == "t" ]; echo TEST; else echo "ERROR: Invalid environment specified" echo " First parameter must be d or t" exit 1; fi
When I run it I get a syntax error on the "else" line, saying
syntax error near unexpected token `else'
Rojomoke ( talk) 12:07, 29 June 2012 (UTC)
if [ "$type" == "d" ] then echo "DEV" elif [ "$type" == "t" ] then echo "TEST" else echo "ERROR: Invalid environment specified" echo " First parameter must be d or t" exit 1 fi
case "$type" in "d") echo "DEV" ;; "t") echo "TEST" ;; *) echo "ERROR: Invalid environment specified" echo " First parameter must be d or t" exit 1 ;; esac
thenappear redundant. Were they not there, why could BASH not echo the strings (other than that it insists on thens)? In other words, why do the Ifs and Elseifs not work like the else? -- Tagishsimon (talk) 13:52, 29 June 2012 (UTC)
if false true then echo hello fi if false then true echo goodbye fi
I use 64 bit Internet Explorer v9.0.8 and Windows 7 Ultimate (64bit).
When I drag or right-click-drag the (tiny) web site favicon, located at the left of the http address in the address bar in Internet explorer, and drop it into the harddisk folder where I want to keep the link, then The link gets created as I want it to, but IT allways ALSO immediately GETS OPENED in a new Internet Explorer window, which is quite annoying.
How do I create the link without the "auto open" when I do it? --
89.9.199.35 (
talk) 14:42, 29 June 2012 (UTC)
I'm not sure, but I think this is the right place. For a project I'm working on, I need to provide drawings done in a Pantone colour scheme, complete with the PMS swatch# of each colour used, how do I do this, and find this information, preferably without having to buy an expensive drawing program?
85.210.118.241 ( talk) 17:06, 29 June 2012 (UTC)
I installed a wireless repeater for a home network. When setting it up, it asked for a name and a password. I thought it might mess things up if I gave it the same name as the existing network so I gave it a different name. Can the repeater network have the same name as the regular wireless network? Bubba73 You talkin' to me? 17:16, 29 June 2012 (UTC)
OK, I'll leave it as it is (a variation on the real network's name. Bubba73 You talkin' to me? 03:15, 5 July 2012 (UTC)
Hi, I have a fairly simple bit of Perl code that I've been adding to and which has been working mostly well. After a few more additions, I got an error: Unmatched ) in regex; marked by <-- HERE. HERE is pointing to a ) near the end of 'if ($file->{title} =~ /^File\:( ' (with lots of files specified inbetween, each separated by |). I don't know much about coding (in Perl) and I've made sure that any non-alphanumeric characters in the file names have / in front of them. I've searched google for help and there's plenty of responses about regex and /Q and /E or some such, but it means nothing to me. Can I have in simple language what I am meant to do to fix this? Thanks! Significand ( talk) 17:54, 29 June 2012 (UTC)
Does anyone know (or know where to find) how a .NET 3D control border is made up? Specifically, I need to know what system colours make up the border of a text box when its BorderStyle property is set to Fixed3D. I'm sure that it's a combination of System.Drawing.ButtonShadow, ControlLight, etc, but I can't work out exactly what colours are used, or what order they appear in at the various edges of the control. Thanks in advance for any help you can give. Tevildo ( talk) 18:10, 29 June 2012 (UTC)
Computing desk | ||
---|---|---|
< June 28 | << May | June | Jul >> | June 30 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
Can anyone point out what's wrong with this bit of Bash script? I've been staring at it for a while now, and can't see the problem.
if [ "$type" == "d" ]; then echo DEV; elif [ "$type" == "t" ]; echo TEST; else echo "ERROR: Invalid environment specified" echo " First parameter must be d or t" exit 1; fi
When I run it I get a syntax error on the "else" line, saying
syntax error near unexpected token `else'
Rojomoke ( talk) 12:07, 29 June 2012 (UTC)
if [ "$type" == "d" ] then echo "DEV" elif [ "$type" == "t" ] then echo "TEST" else echo "ERROR: Invalid environment specified" echo " First parameter must be d or t" exit 1 fi
case "$type" in "d") echo "DEV" ;; "t") echo "TEST" ;; *) echo "ERROR: Invalid environment specified" echo " First parameter must be d or t" exit 1 ;; esac
thenappear redundant. Were they not there, why could BASH not echo the strings (other than that it insists on thens)? In other words, why do the Ifs and Elseifs not work like the else? -- Tagishsimon (talk) 13:52, 29 June 2012 (UTC)
if false true then echo hello fi if false then true echo goodbye fi
I use 64 bit Internet Explorer v9.0.8 and Windows 7 Ultimate (64bit).
When I drag or right-click-drag the (tiny) web site favicon, located at the left of the http address in the address bar in Internet explorer, and drop it into the harddisk folder where I want to keep the link, then The link gets created as I want it to, but IT allways ALSO immediately GETS OPENED in a new Internet Explorer window, which is quite annoying.
How do I create the link without the "auto open" when I do it? --
89.9.199.35 (
talk) 14:42, 29 June 2012 (UTC)
I'm not sure, but I think this is the right place. For a project I'm working on, I need to provide drawings done in a Pantone colour scheme, complete with the PMS swatch# of each colour used, how do I do this, and find this information, preferably without having to buy an expensive drawing program?
85.210.118.241 ( talk) 17:06, 29 June 2012 (UTC)
I installed a wireless repeater for a home network. When setting it up, it asked for a name and a password. I thought it might mess things up if I gave it the same name as the existing network so I gave it a different name. Can the repeater network have the same name as the regular wireless network? Bubba73 You talkin' to me? 17:16, 29 June 2012 (UTC)
OK, I'll leave it as it is (a variation on the real network's name. Bubba73 You talkin' to me? 03:15, 5 July 2012 (UTC)
Hi, I have a fairly simple bit of Perl code that I've been adding to and which has been working mostly well. After a few more additions, I got an error: Unmatched ) in regex; marked by <-- HERE. HERE is pointing to a ) near the end of 'if ($file->{title} =~ /^File\:( ' (with lots of files specified inbetween, each separated by |). I don't know much about coding (in Perl) and I've made sure that any non-alphanumeric characters in the file names have / in front of them. I've searched google for help and there's plenty of responses about regex and /Q and /E or some such, but it means nothing to me. Can I have in simple language what I am meant to do to fix this? Thanks! Significand ( talk) 17:54, 29 June 2012 (UTC)
Does anyone know (or know where to find) how a .NET 3D control border is made up? Specifically, I need to know what system colours make up the border of a text box when its BorderStyle property is set to Fixed3D. I'm sure that it's a combination of System.Drawing.ButtonShadow, ControlLight, etc, but I can't work out exactly what colours are used, or what order they appear in at the various edges of the control. Thanks in advance for any help you can give. Tevildo ( talk) 18:10, 29 June 2012 (UTC)