Jump to content

Linux SQL Queries Question

Go to solution Solved by xXxYOLOxSWAGxXx_420BlazeIt,

I need help on identify the errors in the following scripts:

1.

 

clear

 

 

 

echo -e "/n/r/tThis is a sample shell script. /n/r/tIt displays mounted filesystems"

 

mount

 

 

______ ___________________________________________________

 

2. #!/bin/bash

    clear

    echo “This script will change all permissions on your scripts to rwx------!”

    ls | xargs -d chmod 700

    echo -e “/r/nSuccessfully changed permissions!”

______ ______________________________________________________________________________________________________________________________________________________

 

Thank you

This isnt SQL.

 

Use the code tags.

 

This sounds a lot like a small homework question.

#!/bin/bashclearecho -e "\n\r\tThis is a sample shell script. \n\r\tIt displays mounted filesystems"mount
#!/bin/bashclearecho “This script will change all permissions on your scripts to rwx------!”ls *.sh | xargs chmod 700echo -e “\r\nSuccessfully changed permissions!”

I need help on identify the errors in the following scripts:

1.

 

clear

 

 

 

echo -e "/n/r/tThis is a sample shell script. /n/r/tIt displays mounted filesystems"

 

mount

 

 

______ ___________________________________________________

 

2. #!/bin/bash

    clear

    echo “This script will change all permissions on your scripts to rwx------!”

    ls | xargs -d chmod 700

    echo -e “/r/nSuccessfully changed permissions!”

______ ______________________________________________________________________________________________________________________________________________________

 

Thank you

Link to comment
Share on other sites

Link to post
Share on other sites

Have you also asked this question on Stackoverflow?

If you haven't you should really check it out http://stackoverflow.com/

Current rig: CPU: AMD FX-8120  Cooling: Corsair H100i  Mobo: ASRock 970 Extreme 3  RAM: 8GB 1333Mhz  GPU: MSI GTX 660Ti Power Edition  Case: Fractal Design Define R4  Storage: 2TB Seagate HDD + 128GB Crucial SSD  PSU: be quiet! 730W bronze

 

Link to comment
Share on other sites

Link to post
Share on other sites

I need help on identify the errors in the following scripts:

1.

 

clear

 

 

 

echo -e "/n/r/tThis is a sample shell script. /n/r/tIt displays mounted filesystems"

 

mount

 

 

______ ___________________________________________________

 

2. #!/bin/bash

    clear

    echo “This script will change all permissions on your scripts to rwx------!”

    ls | xargs -d chmod 700

    echo -e “/r/nSuccessfully changed permissions!”

______ ______________________________________________________________________________________________________________________________________________________

 

Thank you

This isnt SQL.

 

Use the code tags.

 

This sounds a lot like a small homework question.

#!/bin/bashclearecho -e "\n\r\tThis is a sample shell script. \n\r\tIt displays mounted filesystems"mount
#!/bin/bashclearecho “This script will change all permissions on your scripts to rwx------!”ls *.sh | xargs chmod 700echo -e “\r\nSuccessfully changed permissions!”
Link to comment
Share on other sites

Link to post
Share on other sites

 

This isnt SQL.

 

Use the code tags.

 

This sounds a lot like a small homework question.

#!/bin/bashclearecho -e "\n\r\tThis is a sample shell script. \n\r\tIt displays mounted filesystems"mount
#!/bin/bashclearecho “This script will change all permissions on your scripts to rwx------!”ls | xargs chmod 700echo -e “\r\nSuccessfully changed permissions!”

I meant scrips not SQL because I just put the wrong name on the title. It's a small assignment, but I can't see anything wrong with it and there is post to be something wrong with it.

Link to comment
Share on other sites

Link to post
Share on other sites

I meant scrips not SQL because I just put the wrong name on the title. It's a small assignment, but I can't see anything wrong with it and there is post to be something wrong with it.

I fixed the errors in the ones that I posted.

 

Escape sequences start with a \ not a /, and your xargs was wrong. the -d wasnt needed in this case.

Link to comment
Share on other sites

Link to post
Share on other sites

I fixed the errors in the ones that I posted.

 

Escape sequences start with a \ not a /, and your xargs was wrong. the -d wasnt needed in this case.

Thank you a lot :)

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×