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

0
votes
2answers
46 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 ...
14
votes
2answers
502 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
49 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 ...
0
votes
2answers
365 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
43 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 ...
5
votes
3answers
1k 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
325 views

Can you do dictionaries in qml?

So for example: Item { id: sylvainLikesAnsweringMyQuestions property var myDict: {[key,value],[anotherKey,anotherValue]} }
0
votes
0answers
281 views

Trying to debug a code, need some help!

so I'm trying to run an installer and I'm getting this message: $ ./install Preparing installation files ... Installing ... /tmp/mathworks_4504/sys/java/jre/glnxa64/jre/bin/java: 4: ...
1
vote
1answer
7k 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
60 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 ...
14
votes
4answers
3k 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 ...
1
vote
1answer
225 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
56 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
115 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
199 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
88 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
122 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
93 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
3k 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 ...
8
votes
2answers
3k 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
850 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 ...
1
vote
1answer
163 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: ...
0
votes
1answer
493 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
373 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
463 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
2k 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?