Syntax refers to the rules of programming languages which stipulate how code is to be arranged so that the structure is syntactically correct and can be executed successfully in the particular framework of those languages.

learn more… | top users | synonyms

6
votes
2answers
165 views

command output redirection using '-< <( … )'

I needed to extract a shasum. This works, but can anyone explain why? sed 's/^.*= //' -< <(openssl dgst -sha256 filename) I'm familiar with the $( ) construct, but can't find docs for <( ),...
0
votes
1answer
41 views

-bash: syntax error near unexpected token `&'

I get this error (-bash: syntax error near unexpected token `&' ) when I run the command below: sudochown -hRfwebadmin:www-data /web/<repertoire>&&sudoln -s /web/<...
0
votes
1answer
81 views

strange command prompt error

Whenever I have two command prompts open I always get this script coming up after I execute the commands. Just to clarify the commands execute and output correctly but after the out put before the ...
0
votes
0answers
38 views

Sass support for Bluefish

I'm looking for a method to make Bluefish supporting Sass as syntax. I'm principally intrested in syntax highlighting, but also autocompletion and why not compiling. Browsing /usr/share/bluefish, I ...
1
vote
2answers
100 views

line 42: syntax error: unexpected end of file [closed]

I'm relatively new to bash scripting so bare with me but I need some help. I feel like i have all the right stuff there but it ain't quite going. I'm attempting to make a simply security log in the ...
0
votes
1answer
22 views

Does MonoDevelop's syntax deviate from VisualStudio's

I'm an IT student and we started learning C# this semester, we are working with VisualStudio 2012 in class. Since I installed ubuntu recently I do not know much about anything, but I like it very much....
0
votes
1answer
57 views

LFS Troubles - Applying Patch in Section 5.7.1 [closed]

Apologize in advance if this has been asked before, and if it is very obvious. I'm following the guide pretty literally at this point to get started. The page in question is this: http://...
3
votes
3answers
346 views

if command syntax

My code of shell script is as follows: echo "Enter file name"; read fname; if [-f$fname]; then echo "File already exists"; fi` However, when I run my script, I get this error: [-ffile]: not ...
-1
votes
1answer
96 views

why does ls -Z returns files names with question marks next to them?

why does ls -Z returns files names with question marks next to them? And what does this command do?
1
vote
1answer
43 views

Conditions and ranges within case statements in bash

I was writing a plugin for Nagios to check the number of security packages and doing a case statement as the one here. but the whole thing ended up turning into a freak show. All I basically wanted ...
7
votes
1answer
286 views

Brackets, Braces, Curly Brackets in Bash

Here goes the riddle: If I do: touch file{1,2,3} It creates file1, file2, file3 And if I do rm file[1-3] It deletes them. but if I do touch file[1-3] it creates: file[1-3] Why?
0
votes
1answer
73 views

Gnuplot script bash problem

I have wrote this script in bash for f in $FILES do echo "Processing file... $f" # take action on each file. $f store current file name B=$(basename $f) filename="${B%.*}" mkdir $BASEDIR/$...
0
votes
0answers
95 views

[1:9]'Uncaught SyntaxError: Unexpected Identifier' Chrome

While trying to play Agar.io I get: [1:9]'Uncaught SyntaxError: Unexpected Identifier' This isn't happening on my Windows PC, and it only started today. I tried to wipe chrome with: sudo apt-get ...
0
votes
0answers
52 views

Computer Boots But Sometimes Monitor Does Not Start

I tried searching for an answer but I did not find one. If it's already been asked, my apologies. The problem is, when I start my samsung laptop it gives me a black screen and stays like that ...
-1
votes
2answers
88 views

substitute values in one text file into another text file

I want to use awk to create a text file that includes a series of awk text lines with numbers that are replaced in. problem i am having is that the text will include awk syntax. ultimately, i want to ...
15
votes
2answers
583 views

What's the missing argument to -exec?

I use the following command to clear a directory, of files and directories over 30 days old, and move them to an archive directory which I can delete after a few weeks if nobody asks for their files ...
1
vote
1answer
56 views

I cannot get grep to print results

Total noob here. I am blindly stumbling my way through bash. I realize that there is a syntax error in the following script but, I cannot figure it out. The script just sits there. #!/bin/bash mac=`...
0
votes
2answers
652 views

PHP Fatal error: Cannot redeclare [ By using php -l in terminal]

I wrote the php script and gone for syntax check via terminal php -l my_filepath, then suddenly found fatal error PHP Fatal error: Cannot redeclare even my code executing successfully. also check on ...
1
vote
1answer
88 views

How to calculate Pi decimals from a given offset?

I am using http://packages.ubuntu.com/lucid/math/pi to calculate Pi decimals. Let's say I want only decimals from the 3rd decimal to the 5th decimal. man pi says it is possible to enter an interval ...
7
votes
3answers
3k views

What is the point of the bash Null-operator “:”, colon?

What is the point of the "null" operator in a BASH script? I understand that it is used as a placeholder following an if command when you have nothing to say, but need a command to allow the program ...
2
votes
1answer
686 views

Can you do dictionaries in qml?

So for example: Item { id: sylvainLikesAnsweringMyQuestions property var myDict: {[key,value],[anotherKey,anotherValue]} }
2
votes
1answer
20k views

“Syntax error: Unterminated quoted string”

I am trying to use a backup script that will backup my sql database and website files. I am running Ubuntu 12.04 32 bit version and zPanel. Here is what my DB structure is along with which DB I want ...
0
votes
1answer
153 views

system(“echo * > toto”) returns an error

when I test this command : system("echo * > toto") (the file toto exists) This error is returned : bash: syntax error near unexpected token"/bin/echo x"'` and I don't understand why. Thank you in ...
15
votes
4answers
5k views

What is the difference between standard syntax and BSD syntax?

I have seen many commands that accept a "BSD syntax" as well as their standard syntax. Take the ps command for one example: To see every process on the system using standard syntax: ps -e ...
0
votes
1answer
351 views

Making sense of rsyslogd rules

First: I'm using Ubuntu Server Linux - 3.13.0-29-generic #53-Ubuntu SMP Wed Jun 4 21:00:20 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux with rsyslogd 7.4.4 I would very much like to make sense of the ...
1
vote
1answer
78 views

QML: How to display a “<” character in a richTextBox?

The code in question: description.insert(0,"<tr><td><H1> ---Less-Than-Sign-Here--- </H1></td><td><font face='Ubuntu'size='3'color='#f37420'> ...
0
votes
1answer
183 views

using rsync between 2 ubuntu servers having a folder with SPACE in the name, how to make it work?

I used rsync alot, but never found out how to copy a folder which had a space in the name. like this : sudo rsync -rv myuseraccount@192.168.xxx.xx:/data/svn/my folder /data/svn/ i tried already ...
0
votes
1answer
278 views

Turn off display after n seconds in shell script

#!/bin/sh ( time=$( zenity --scale --min-value=0 --max-value=20 --text="Pls Select Time in(s)") ) && sleep $time && xset dpms force off I wanted to turn off display after n seconds, ...
1
vote
0answers
123 views

Syntax Error while running an install.sh file

I have a problem with a .sh file. This file will install a. Py file in the same folder! The file looks like this: #!/bin/bash/ python install.py "$ @" Can somebody pleace help me?
0
votes
1answer
3k views

SSH scp between Ubuntu Server 12.04 and Windows failing - (prob syntax)

I was trying to use scp to copy files from my Windows system to my Ubuntu server, and vice versa. As you know, when defining a path in Windows, "\" must be used instead of "/", and a "C:" at start. ...
0
votes
1answer
135 views

Why won't my script work?

umm my script isn't working and I don't know why, it gives me the error "update1.run: line 187: syntax error: unexpected end of file" Here's my code http://pastebin.com/4W4AwuY5 I would really ...
0
votes
1answer
101 views

Question about this shell command

I am new to Ubuntu and learning how to use shell. Would someone please tell me what this command does: sudo sh -e ~/Downloads I know sudo sh will execute all commands in the shell as sudo. What is -...
1
vote
0answers
5k views

Xerox Work center JCL syntax error/ Printing error (016-749)

Its long since Xerox workcenter 5225 is not working with my ubuntu 32 bit. The new error i am receiving is that says JCL syntax error. Still gnome in ubuntu tells me printing is successful but it ...
10
votes
2answers
4k views

meaning of “'” (apostrophe) in terminal commands

For some weird reason, I tried "'" as word separator in identifiers, as in: $ export foo'bar=1 > > ^C $ The result is as shown above, id est the prompt changes to ">" and the system ...
0
votes
1answer
1k views

Syntax error on python 2.7.3

I am trying to perform a QSTK related task on python2.7.3 but ending up with syntax error [Python 2.7.3 (default, Sep 26 2012, 21:51:14) [GCC 4.7.2] on linux2 Type "copyright", "credits" or "license(...
1
vote
1answer
165 views

sudoers syntax different for server vs desktop?

Is there a difference in syntax between the server and desktop ubuntu 12.04 distro? If so could I get help rewriting this line to be valid for the desktop env? user1 ant =(user1) NOPASSWD: ~/progs/...
0
votes
1answer
652 views

How do I solve this “unexpected '}' syntax error” in my bash script?

I have a piece of code that has some serious issues and I was hoping to get it solved soon but no one has offered any help. I thought I'd try some Ubuntu users since this is the OS running the script. ...
0
votes
1answer
400 views

Is there a difference between the 'acer-wmi' and 'acer_wmi' drivers?

Is there a difference between drivers acer-wmi, and acer_wmi? Sometimes on my computer I see the driver acer-wmi and acer_wmi, they are also both quoted in forums interchangeably.
0
votes
1answer
501 views

Iptables rule for server accessed remotely via DHCP

Sorry to ask this question - but I have been browsing forums and threads on this subject and seem to confuse myself more than actually getting any clarity. All I need is a short and concise answer for ...
4
votes
3answers
3k views

Is the command line structure the same for Linux and Ubuntu?

I'm new to the Linux world. I'm curious to know if the command line syntax is the same between Linux and Ubuntu?