Advertisement

10.31.2005 at 01:37AM PST, ID: 21613615
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.4

shell script help required syntax error  in debian

Asked by gg234 in Linux Programming

Tags: , ,

Hi

I am writing a script to adduser,group and create a folder called public_html with the permissions required and i am deleting the user.For this i am trying write a script with options selection for adding user,deleting user and exit.The script as follows.when i try to run these two scripts it is working fine.I am trying this script in debian.When i combine with the menu script i am getting syntax error

complete.csh: line 2: echo===============================================================: command not found

Welcome to User Management \!\!

complete.csh: line 6: echo===============================================================: command not found

complete.csh: line 20: syntax error near unexpected token `newline'
complete.csh: line 20: `set num = $ <'

Script


#!/bin/bash
echo"==============================================================="
echo ""
echo " Welcome to User Management \!\! "
echo ""
echo"==============================================================="
echo ""

while (1)

echo ""
echo ""
echo "Please select an option from the following menu."
echo ""
echo "1. Add New Account"
echo "2. Remove existing account"
echo "3. Exit Menu"
echo ""
echo -n "Enter selection >> "
set num = $ <
echo ""
echo ""

switch ($num)

case 1:
echo "User to add:"; read UAuser;
groupadd $UAuser
useradd -g $UAuser -m -d /home/www/$UAuser -s /bin/sh $UAuser
mkdir /home/www/$UAuser/public_html
chown $UAuser /home/www/$UAuser -R
chgrp $UAuser /home/www/$UAuser -R
chmod 711 /home/www/$UAuser -R
chmod 755 /home/www/$UAuser/public_html/ -R
passwd $UAuser
echo
echo "User added. "
exit 0
breaksw

case 2:
echo "Enter the UserName:"; read UAuser
userdel -r $UAuser
groupdel -r $UAuser
echo
echo "User deleted Successfully"
exit 0
breaksw

case 3:
exit
endsw
continue
end

Thanks for your help

Start Free Trial
[+][-]10.31.2005 at 01:39AM PST, ID: 15191491

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.31.2005 at 01:40AM PST, ID: 15191497

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.31.2005 at 01:42AM PST, ID: 15191508

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.31.2005 at 01:45AM PST, ID: 15191514

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.31.2005 at 01:46AM PST, ID: 15191518

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.31.2005 at 01:47AM PST, ID: 15191524

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.31.2005 at 01:47AM PST, ID: 15191525

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.31.2005 at 01:49AM PST, ID: 15191532

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.31.2005 at 01:50AM PST, ID: 15191536

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.31.2005 at 01:53AM PST, ID: 15191550

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.31.2005 at 01:57AM PST, ID: 15191565

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.31.2005 at 02:00AM PST, ID: 15191572

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.31.2005 at 02:06AM PST, ID: 15191589

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.31.2005 at 02:18AM PST, ID: 15191614

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.31.2005 at 02:32AM PST, ID: 15191654

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Linux Programming
Tags: unexpected, error, syntax
Sign Up Now!
Solution Provided By: ozo
Participating Experts: 1
Solution Grade: A
 
 
[+][-]10.31.2005 at 02:36AM PST, ID: 15191665

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.31.2005 at 02:48AM PST, ID: 15191704

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.31.2005 at 02:58AM PST, ID: 15191747

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.31.2005 at 03:03AM PST, ID: 15191766

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-42