Quartus Ubuntu Syntax Error Unexpected
Contents |
Get Kubuntu Get Xubuntu Get Lubuntu Get UbuntuStudio Get Mythbuntu syntax error: "(" unexpected bash Get Edubuntu Get Ubuntu-GNOME Get UbuntuKylin Ubuntu Code of syntax error at line 1 (' unexpected in shell script Conduct Ubuntu Wiki Community Wiki Other Support Launchpad Answers Ubuntu IRC Support AskUbuntu Official Documentation
Syntax Error ( Unexpected Bash Array
User Documentation Social Media Facebook Twitter Useful Links Distrowatch Bugs: Ubuntu PPAs: Ubuntu Web Upd8: Ubuntu OMG! Ubuntu Ubuntu Insights Planet Ubuntu Activity
Syntax Error ( Unexpected Ubuntu
Page Please read before SSO login Advanced Search Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [SOLVED] sh can't open script? Having an Issue With Posting ? Do you want to help us debug the posting issues ? < is the place to report ksh syntax error unexpected it, thanks ! Results 1 to 10 of 10 Thread: sh can't open script? Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode November 22nd, 2011 #1 Los Frijoles View Profile View Forum Posts Private Message Just Give Me the Beans! Join Date Sep 2007 Beans 51 sh can't open script? I am in the process of installing the Altera Quartus II Web Edition software. It comes in a gigantic 3GB shell script. However, even after giving permissions to execute and stuff I cannot get the install to run. Here is what I get: Code: kcuzner@kcuzner-AOA150:~/Downloads$ ll total 3187816 -rwxrwxrwx 1 kcuzner kcuzner 3203561074 2011-11-22 08:44 11.1_173_quartus_free_linux.sh .... kcuzner@kcuzner-AOA150:~/Downloads$ sh /home/kcuzner/Downloads/11.1_173_quartus_free_linux.sh sh: Can't open /home/kcuzner/Downloads/11.1_173_quartus_free_linux.sh kcuzner@kcuzner-AOA150:~/Downloads$ sh ./11.1_173_quartus_free_linux.sh sh: Can't open ./11.1_173_quartus_free_linux.sh kcuzner@kcuzner-AOA150:~/Downloads$ sh 11.1_173_quartus_free_linux.sh sh: Can't open 11.1_173_quartus_free_linux.s
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting
Line 1: Syntax Error: Unexpected Word (expecting ")")
ads with us Unix & Linux Questions Tags Users Badges Unanswered Ask Question _ Unix & syntax error word unexpected (expecting ) ) shell script Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute: bash function syntax error unexpected Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Shell script fails: Syntax error: “(” unexpected up vote 31 down vote favorite 7 I've been https://ubuntuforums.org/showthread.php?t=1885162 working on a script that automates setting up a development environment for Raspberry Pi development (step by step details that work are here). The script is linked in that article but convenience you can find it here also. Now when run this script install and sets up the environment without error but you have to enter your sudo password more than once due to sudo's time-out value by default. So I started experimenting by removing all the sudo lines and running the whole script http://unix.stackexchange.com/questions/45781/shell-script-fails-syntax-error-unexpected via sudo at the command line like so: kemra102@ubuntuvm:~$ sudo ./pi_dev_env_install.sh This works fine as expected and gets most of the way through until this point: ./pi_dev_env_install: 68: ./pi_dev_env_install.sh: Syntax error: "(" unexpected Now this line worked fine previously when not running the whole script with sudo. There is nothing about this line running as sudo that should stop it working to my knowledge, does anyone have any ideas? bash shell ubuntu shell-script share|improve this question edited Aug 18 '12 at 12:08 Gilles 373k696801129 asked Aug 18 '12 at 11:37 kemra102 4731613 The shebang is really in line 9? Due to Ubuntu's DashAsBinSh affinity I suspect your script is interpreted by dash instead of bash. Try to move the shebang in line 1. –manatwork Aug 18 '12 at 11:45 According to that article calling /bin/bash directly instead of /bin/sh will; correctly use bash instead of dash so that should not be an issue as I understand it. I can still move the shebang of course, but that doesn't really explain as to why it works when you don’t sudo the whole script. –kemra102 Aug 18 '12 at 11:50 add a comment| 5 Answers 5 active oldest votes up vote 47 down vote accepted The script does not begin with a shebang line, so the kernel executes it with /bin/sh. On Ubuntu, /bin/sh is dash, a shell designed for fast startup and execution with only standard features. When dash reaches line 68, it sees a syntax e
1 Downloading and installing Quartus II 1.1 Setting up the USB permissions for the Quartus Programmer 2 Downloading and Installing Open Watcom 3 Synthesizing Zet 4 Installing the system Downloading and http://zet.aluzina.org/index.php/Synthesis_guide installing Quartus II First, we need to get Quartus II for Linux from the Altera http://stackoverflow.com/questions/37846501/verilog-error-unexpected-expecting-identifier-or-type-identifier website, which is free of charge and doesn't need any license. The latest version in the time of writing is 11.1 SP2. To do this: Go to altera.com and then click on the upper right link "Download Center". In the Download Individual Components section, Step 1 we select Quartus II Web Edition, Step 2, we select the latest version at the syntax error moment (11.1 Service Pack 2), then Step 3, view download. We click on the file 11.1sp2_quartus_free_linux.sh which is a 3.0GB file. Now, we can create a one-time access, by entering an email address (any address will work) and the download will start. It's a 3.0 Gb file:) We choose to download it at ~/Downloads for example. Once downloaded, we untar it. So we open a terminal window: cd ~/Downloads chmod 755 11.1sp2_259_quartus_free_linux.sh ./11.1sp2_259_quartus_free_linux.sh This will probably fail syntax error unexpected in Ubuntu with the following message: ./setup: 1: Syntax error: "&" unexpected To avoid this, change the /bin/sh link to /bin/bash: sudo ln -sf bash /bin/sh Now, run it again: cd 11.1sp2_259_quartus_free_linux/ ./setup $(cat .setup_args) A graphical installer will appear: The first is a welcome screen, we click on Next >. 2nd you agree on the license terms. Click it and Next >. 3rd you choose the installation directory, in my case I usually leave it as /home/zeus/opt/altera/11.1sp2. Then Next >. 4th choose the devices families. We can click on Cyclone II, III and IV and leave the others unselected, as we don't support them. Then Next >. 5th review and click Next >. The installation starts and eventually ends. 6th there is a prompt asking you to activate TalkBack, where you can deactivate it and click ok. 7th the installation asks you if you want to remove the temporary files. You can click on Yes. 8th we unclick Start Quartus II 11.1sp2 and Get Quartus II Subscription License. Then click on Finish. We can try to run it by executing: ~/opt/altera/11.1sp2/quartus/bin/quartus. It can fail with the following message: bash: warning: setlocale: .... To fix it just run this command: sudo locale-gen en_US en_US.UTF-8 Now exit the terminal and open a new one again. It should work now. Setting up the USB permissions for the Quartus Programm
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Verilog Error unexpected '=', expecting identifier or type_identifier up vote 0 down vote favorite I'm building a test bench night now, and I'm not sure how should I connect several modules I built earlier. Here's the modules I used, all of them were tested and works properly. counter11bit_abc ctr2(ctr_enable, ctr_clr, clk_out, counter); register10bit_abc dut3(clk_out, d_in, q_out); clk #(400) clk1(clk_enable, clk_out); hc85_abc dut4(a_in, b_in, ia_lt_b, ia_eq_b, ia_gt_b, qa_lt_b, qa_eq_b, qa_gt_b); I need to connect the following ports: assign a_in = counter [3:0]; assign b_in = counter [7:4]; assign ia_lt_b = counter [8]; assign ia_eq_b = counter [9]; assign ia_gt_b = counter [10]; assign d_in[0] = ia_gt_b; assign d_in[1] = ia_eq_b; assign d_in[2] = ia_lt_b; Declaration is as followed: wire [9:0] d_in; wire [9:0] q_out; wire [3:0] a_in, b_in; wire ia_lt_b, ia_eq_b, ia_gt_b, qa_lt_b, qa_eq_b, qa_gt_b; reg clk_enable; reg ctr_enable; reg ctr_clr; wire clk_out; wire [10:0] counter; For the initial part I dropped down as follow: initial clk_enable = 1; ctr_enable = 1; ctr_clr = 1; #400 ctr_clr = 0; #1000000 Now the compiler is giving me a complain says near "=": syntax error, unexpected '=', expecting IDENTIFIER or TYPE_IDENTIFIER And that is for the line where "ctr_enable = 1;" Is there anyone know what may cause this issue? I've been working on it for more than an hour trying everything I can. Thanks. verilog quartus-ii procedural share|improve this question asked Jun 15 at 21:57 SYM2RR 2117 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote accepted In Verilog, initial will apply to only the following statement, unless enclosed in begin/end, irrespective of indentation (since it's not Python). As a result, your second line (ctr_enable = 1) is completely independent of the always keyword. The fix is adding begin/end: initial begin clk_enable = 1; ctr_enable = 1; ctr_clr = 1; #400 ctr_clr = 0; #1000000