I am using MATLAB from my college network which has a limited number of users. So whenever I type matlab
in terminal if the user limit is exceeded, then it shows errors: "user limit exceeded", and now I have to try again and again. I want to write a script that opens terminal and writes 'matlab' into it and if it opens then stop else keep on running.
Add a comment
|
1 Answer
#!/bin/sh
while [ matlab | grep -q 'user limit exceeded' ]
do
matlab
echo "Trying again"
done
echo "Success!"
That should do it.