Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bad bash shell script has me stumped...
Message
Information générale
Forum:
Linux
Catégorie:
Autre
Divers
Thread ID:
00448801
Message ID:
00449101
Vues:
21
>>> if [ "$username" != "" -a "$password" != "" ]; then
>>> useradd $username
>>> echo $username:$password | chpasswd
>>
>>Again, I would do away with the echo and just say: chpasswd $username:$password
>
>I'll try that... it looks cleaner. But, I still have to get the 'if' statement syntax correct, and for
>the life of me I can't see any errors.

You could try taking out the semi colon and putting the 'then' on the next line.

>>> else
>>> echo "$username" >> /tmp/importerror.log
>>
>>How about losing the "'s? =) Does importerror.log exist?
>
>What 's'?

Not 's'. I meant for that to read Quotation Mark's. =)

j
Jason Bradley Nance
jbnance@tresgeek.net

Got root?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform