[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-bash] Help With School Assignment, Learning Bash Scripts
From: |
nick |
Subject: |
[Help-bash] Help With School Assignment, Learning Bash Scripts |
Date: |
Wed, 05 Nov 2014 21:01:00 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
I am trying to feature out the below question and can't seem able to.
Cheers Nick
The best approach is to check each positional parameter within the loop,
before the addition.
You will use an "echo" to display the value of the "number" variable,
and pipe the output into a "grep". The "grep" should search for a single
character which is NOT a digit or a plus or minus sign. A character class,
something like "[^0-9+-]" would be the easiest way to do this.
If the "grep" is successful, then the message should be displayed and the
script terminated.
Continue to the next step to see how to start.
- [Help-bash] Help With School Assignment, Learning Bash Scripts,
nick <=
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, Eduardo A . Bustamante López, 2014/11/05
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, Eric Cook, 2014/11/05
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, Eduardo A . Bustamante López, 2014/11/05
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, Greg Wooledge, 2014/11/06
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, nick, 2014/11/06
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, Eduardo A . Bustamante López, 2014/11/06
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, nick, 2014/11/06
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, Greg Wooledge, 2014/11/07
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, Eric Blake, 2014/11/07
- Re: [Help-bash] Help With School Assignment, Learning Bash Scripts, Greg Wooledge, 2014/11/07