Search Results

Search: Posts Made By: fufaso
2,107
Posted By fufaso
you are correct - it is a file - my mistake. ...
you are correct - it is a file - my mistake.


That was what I was wanting to do, but as soon as I move the cut command outside of the if statement, it doesn't work and i get this error:

cut:...
2,107
Posted By fufaso
Updating a database
i've got a database setup that references user inputs to see if they are already inputted. What I am wanting to do is allow the user to update the database by typing
"update: name" where name is...
15,087
Posted By fufaso
that got it. your help has been much...
that got it.

your help has been much appreciated. I'm hoping I can get this stuff down so that I'll be able to re-pay the help down the road to people.
15,087
Posted By fufaso
ahhh i get it. Thanks so much for that. This...
ahhh i get it. Thanks so much for that. This whole learning a new language thing is pretty tough.

Can you have a look at this and let me know what's wrong?
This is my last step for this script.
...
15,087
Posted By fufaso
That's great thanks so much. if [ "$NAME"...
That's great thanks so much.


if [ "$NAME" = "" ] || [ "${NAME//[!0-9]}" != "" ];
just so I understand what's going on here -

I'm going to guess that // indicate "contain" and [!0-9] means...
15,087
Posted By fufaso
ahhh thanks for that spot. Could I use the...
ahhh thanks for that spot.

Could I use the same general idea to do the same but have the user input an age and check against characters?
15,087
Posted By fufaso
This is what I've got with the code you showed...
This is what I've got with the code you showed me, and it's catching numbers, but it's also catching letters and there is an endless loop of re-entering the name regardless of what is inputted.

...
15,087
Posted By fufaso
Thanks guys, that fixed my issue. Any ideas...
Thanks guys, that fixed my issue.

Any ideas how to validate that the user put in a name as oppose to numbers?
As it stands, if the user inputs 123 for their name, that's what stores...
15,087
Posted By fufaso
Validating user input
I'm trying to set up a script that takes user input and validates that the user input was entered correctly.

So far I have this:

while :
do
echo "Please enter your name."
...
26,016
Posted By fufaso
thanks!
thanks!
26,016
Posted By fufaso
Ok I'm really confused. This is my code and...
Ok I'm really confused. This is my code and everything works up to the case statement where for some reason it isn't even reading it. When I run the script it just stops after the echo $AGE line.
...
26,016
Posted By fufaso
Using a case statement with a range of numbers
Hey guys,

I'm trying to setup a case statement that checks a value against 5 separate ranges of numbers.

Here are the things I've tried with no success.

case "$AGE" in
"<10") echo...
Showing results 1 to 12 of 12

 
All times are GMT -4. The time now is 03:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy