![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Sep 2009
Posts: 2
Rep Power: 0
![]() |
Hello, (name) Problem
#!/bin/bashWell im currently trying to run this Script but when I run it on my shell this is the output. Hello, please say your name! (Output) Tom <-- (My input) ': not a valid identifier 'test (Output) Hello (Output) Could anyone tell me what is the problem? Thanks |
|
|
|
|
|
#2 |
|
Professional Programmer
Join Date: Jun 2005
Location: here
Posts: 299
Rep Power: 6
![]() |
Re: Hello, (name) Problem
test is a bash reserved word (a command, actually. man test for details). Use a different variable name.
__________________
"...and though our kids are blessed their parents let them shoulder all the blame." - The Quiet Things That No One Ever Knows [BrandNew] |
|
|
|
|
|
#3 |
|
Hobbyist Programmer
Join Date: Jul 2009
Posts: 129
Rep Power: 0
![]() |
Re: Hello, (name) Problem
Please change the variable test as it is kind of reserved word in perl
|
|
|
|
|
|
#4 | |
|
Professional Programmer
Join Date: Jun 2005
Location: here
Posts: 299
Rep Power: 6
![]() |
Re: Hello, (name) Problem
Quote:
__________________
"...and though our kids are blessed their parents let them shoulder all the blame." - The Quiet Things That No One Ever Knows [BrandNew] |
|
|
|
|
|
|
#5 |
|
Newbie
Join Date: Mar 2010
Posts: 1
Rep Power: 0
![]() |
Re: Hello, (name) Problem
Test is a reserved work, its like echo, read. The shell will not let you use these words as a variable
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| vb looping statement problem | toki | Visual Basic | 2 | Dec 9th, 2009 4:23 PM |
| Problem using isdigit help!! | DJ007 | C | 4 | May 5th, 2009 6:29 PM |
| How to develop problem analysis skills to enable one to decipher a given problem before coding in C++ | Man G | C++ | 7 | Apr 16th, 2009 4:49 AM |
| Challenging Programming Problem - "Pinball Ranking" | Sane | Coder's Corner Lounge | 38 | Jan 15th, 2008 5:16 PM |
| Problem solving | ReggaetonKing | Software Design and Algorithms | 7 | Jan 4th, 2008 1:49 PM |