# Need Linux script help.

**URL:** <https://forums.speedlife.net/t/need-linux-script-help/48251>\
**Category:** NYSpeed Off Topic\
**Created:** [May 11, 2008, 12:15pm UTC](https://forums.speedlife.net/t/need-linux-script-help/48251 "2008-05-11T12:15:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![PureXTC](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/purextc/32/5223_2.png) [@PureXTC](https://forums.speedlife.net/u/PureXTC)\
**Post date:** [May 11, 2008, 12:15pm UTC](https://forums.speedlife.net/t/need-linux-script-help/48251/1 "2008-05-11T12:15:54Z")

</div>

Anybody know how to use a case statment inside of another case statement? I can’t seem to get the second statement to hold. (syntax error)

---

<div class="post-metadata">

**Author:** ![boardjnky4](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@boardjnky4](https://forums.speedlife.net/u/boardjnky4)\
**Post date:** [May 11, 2008, 2:04pm UTC](https://forums.speedlife.net/t/need-linux-script-help/48251/2 "2008-05-11T14:04:17Z")

</div>

it should work. Might be better off just using an if statement though. What language? Any compilation errors? Does the program run?

---

<div class="post-metadata">

**Author:** ![boxxa](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/boxxa/32/5045_2.png) [@boxxa](https://forums.speedlife.net/u/boxxa)\
**Post date:** [May 11, 2008, 7:55pm UTC](https://forums.speedlife.net/t/need-linux-script-help/48251/3 "2008-05-11T19:55:39Z")

</div>

what shell are you scripting in?

if you do your statements normally it will work.

if [conditional]

else

```
if [conditional]
fi

```

fi

---

<div class="post-metadata">

**Author:** ![PureXTC](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/purextc/32/5223_2.png) [@PureXTC](https://forums.speedlife.net/u/PureXTC)\
**Post date:** [May 11, 2008, 8:06pm UTC](https://forums.speedlife.net/t/need-linux-script-help/48251/4 "2008-05-11T20:06:50Z")

</div>

it’s the bourne shell. I figured it out. I needed ;; after the first esac but not the second. Also we had to make the script without using if statements. Thanks for the help guys.

---

<div class="post-metadata">

**Author:** ![boxxa](https://yyz2.discourse-cdn.com/flex034/user_avatar/forums.speedlife.net/boxxa/32/5045_2.png) [@boxxa](https://forums.speedlife.net/u/boxxa)\
**Post date:** [May 12, 2008, 6:16am UTC](https://forums.speedlife.net/t/need-linux-script-help/48251/5 "2008-05-12T06:16:37Z")

</div>

> [@PureXTC"](#):
>
> Anybody know how to use a **case statment** inside of another case statement? I can’t seem to get the second statement to hold. (syntax error)

wow this is why i dont post at night.
