Search Results

Search: Posts Made By: nickzourdos
1,531
Posted By nickzourdos
Fixed it! My syntax for the while loop that...
Fixed it!

My syntax for the while loop that checked STATE was bad. In bash, you have to use -a instead of &&:


while [ "$STATE" != "MI" -a "$STATE" != "OH" -a "$STATE" != "IL" -a "$STATE" !=...
1,531
Posted By nickzourdos
Multiple while statements?
I'm working on a script for class as a final project. We have to ask for values (city, state, zip) five times, but the state can only be MI, IN, IL, or OH. I'm trying to do this with a while loop...
2,769
Posted By nickzourdos
And just like that... hours and hours of work is...
And just like that... hours and hours of work is fixed. That's what I get for being a noob haha :wall:

Many thanks!
2,769
Posted By nickzourdos
Well that explains a lot! The more you know... ...
Well that explains a lot! The more you know...

And the script is telling me the variables aren't equal because a tar file includes the directory, and an ls doesn't.
2,769
Posted By nickzourdos
Simple echo problem
Hey all! I'm in an intro to UNIX class at university, and we've just began writing scripts. Naturally I can't get it to do what I want.

Basic script as follows:


COMPARE1=`ls|wc -l`
tar czf...
Showing results 1 to 5 of 5

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