Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i had copy of antivir-workstation-pers-<3.1.3.5-0> in folder home/yusvian/Download
i made a script to install it but always get respons :
bash: syntax error near unexpected token 'newline'
my script is : cd Downloads/antivir-workstation-pers-<3.1.3.5-0>
somebody please help me
If you click on 'Post Reply' instead of 'Quick reply', you'll see a hash (#) in the tools menu which will wrap CODE tags around selected text.
It would be best if you were to post the full contents of your scrip and highlight it, then click on the hash to wrap CODE tags around it. This way we can see exactly how your script is put together in order to troubleshoot it.
From what I see so far, you have a Download folder, but you say your script prompts to change into a Downloads folder (plural). Is this the problem or a typo?
More generally, the shell has already told you what the problem is, if not where. It's a syntax error, and it has something to do with it coming across a newline where there shouldn't be one.
So start going through the script line by line, and search for syntax errors. Focus on things like improperly quoted strings and variables, improperly closed commands, and, as mentioned, missing semicolons.
Sometimes solving a bug simply requires the grunt work of slogging through the code.
i had copy of antivir-workstation-pers-<3.1.3.5-0> in folder home/yusvian/Download
i made a script to install it but always get respons :
bash: syntax error near unexpected token 'newline'
my script is : cd Downloads/antivir-workstation-pers-<3.1.3.5-0>
somebody please help me
The '>' and '<' characters have special meaning for the shell and need to be quoted.
Code:
cd "Downloads/antivir-workstation-pers-<3.1.3.5-0>"
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.