GNUstep.csh file will not source - objective-c

When I try the following in my GNUstep/Makefiles directory:
source GNUstep.csh
I receive the following output:
bash: GNUstep.csh: line 84: syntax error near unexpected token `"${GNUSTEP_USER_CONFIG_FILE}"'
bash: GNUstep.csh: line 84: ` switch ("${GNUSTEP_USER_CONFIG_FILE}")'
Obviously something is wrong, but I don't really know bash and from what I see nothing appears to be mislabled, unless there isn't supposed to be quotes around the variable or something.

Related

making snakefile for data analysis

I am making a Snakefile for data analysis. the extension of my raw data is .RCC. for example the first input file I have is: CF30207_01.RCC.
and the script I am running on the data is QC.py. Looking at the tutorial, I have made the following snakefile:
SAMPLES = ["CF30207_01",
"CF30212_06",
"CF30209_03",
"CF30213_07",
"CF30211_05",
"CF30214_08"]
rule all:
input:
expand('{sample}.RCC', sample=SAMPLES)
rule QC:
input:
rc = '/home/snakemaker/{sample}.RCC'
output:
'{sample}.pdf'
"quality_control.csv"
shell:
"python3 QC.py"
but I got the following errors:
./Snakefile: line 1: SAMPLES: command not found
./Snakefile: line 2: CF30212_06,: command not found
./Snakefile: line 3: CF30209_03,: command not found
./Snakefile: line 4: CF30213_07,: command not found
./Snakefile: line 5: CF30211_05,: command not found
./Snakefile: line 6: CF30214_08]: command not found
./Snakefile: line 8: rule: command not found
./Snakefile: line 9: input:: command not found
./Snakefile: line 10: syntax error near unexpected token `'{sample}.RCC','
./Snakefile: line 10: ` expand('{sample}.RCC', sample=SAMPLES)'
but I followed exactly the same structures. do you guys know how I can fix the problem is with this snakefile?
I guess you are executing the snakefile script itself as ./Snakefile. Instead, you should do
snakemake -s /path/to/Snakefile
Or just snakemake if the Snakefile is in the current directory.
Welcome to snakemake! You have a good start, but couple of other notes on your snakefile.
rule all:
input:
expand('{sample}.RCC', sample=SAMPLES)
The rule all should request the final outputs of your workflow, not the inputs. These are the files you are requesting to be made. Change the input to:
expand('{sample}.pdf', sample=SAMPLES)
For the QC rule, it doesn't seem like you are passing the input/output files to the QC.py script. If you have command line arguments in that function, you can add them like:
"python3 QC.py --input {input.rc} --output {output[0]}"
Alternatively you can pass QC.py to the script directive and use snakemake.input[0], etc to access the files in your python code.
Within the output
output:
'{sample}.pdf'
"quality_control.csv"
You need to add a comma between the files to make them a list. Also note that every sample will output to the same quality_control.csv. At best this will overwrite and only keep the last sample, if you have multithreading you may have an error in your python code. You may want something like:
output:
'{sample}.pdf',
'quality_control_{sample}.csv'
If your QC code actually appends to quality_control, you can instead force a single execution at a time for that rule with custom resources
A good test for new snakefiles is to run snakemake -nq to make sure the file syntax is ok and you have the expected number of rules queued up.

Ansible docker invalid character %

I am writing some ansible to automate my docker deployments.
I am trying to set an env variable to be % but I get this error:
ERROR! Syntax Error while loading YAML.
found character that cannot start any token
The error appears to have been in '/vagrant/roles/zoneminder_docker/tasks/main.yml': line 21, column 24, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
MYSQL_ROOT_PASSWORD: mysqlpsswd
MYSQL_ROOT_HOST: %
^ here
Is there any way to escape this character? As if I exclude this line, my deployment fails.
Is there any way to escape this character? As if I exclude this line, my deployment fails.
The thing you are looking for is to make that value a string literal:
MYSQL_ROOT_PASSWORD: mysqlpsswd
MYSQL_ROOT_HOST: '%'

redirecting sql output to a file in a shell script

I am facing an issue while executing the following script snippet.
$ORACLEHOME/bin/sqlplus -s $DBUSER/$DBPASSWORD <<EOF
set pages 0 feedback off
SELECT * FROM ERR_STG_ROAMING_PARTNER;
EOF > Err_File.txt
The following error message appears.
./Roaming.sh: line 213: warning: here-document at line 206 delimited by end-of-file (wanted `EOF')
./Roaming.sh: line 214: syntax error: unexpected end of file
Any help will be appreciated.
Try this:
$ORACLEHOME/bin/sqlplus -s $DBUSER/$DBPASSWORD > Err_File.txt <<EOF
set pages 0 feedback off
SELECT * FROM ERR_STG_ROAMING_PARTNER;
EOF
That is, specify the output redirection before the input heredoc redirection. The shell expects EOF to be on its own on the line terminating the heredoc.
The error message you are getting is the shell complaining about finding end-of-file (of the script file) before finding EOF. The usage of EOF for the heredoc delimiter might lead to some confusion here!

Importing .sql file into SQLite

I'm trying to import a large .sql file into an SQLite .db file, but I'm getting the following errors:
sqlite> .read ./smsCorpus_en_2012.04.30.sql
Error: near line 23: near "COMMENT": syntax error
Error: near line 50: near "LOCK": syntax error
Error: near line 52: near "some1": syntax error
Error: near line 58: near "s": syntax error
Error: near line 60: near "s": syntax error
Error: near line 66: near "UNLOCK": syntax error
The file is located at http://wing.comp.nus.edu.sg:8080/SMSCorpus/data/corpus/smsCorpus_en_sql_2012.04.30.zip (direct file link) linked on this page http://wing.comp.nus.edu.sg:8080/SMSCorpus/history.jsp
EDIT: just a warning, the file is quite large...not sure if this is the issue?
That file is a MySQL dump.
To make SQLite understand it, you have to:
delete COMMENTs on the table fields;
remove AUTO_INCREMENT from id (INTEGER PRIMARY KEY fields are autoincrementing in SQLite anyway);
remove ENGINE and DEFAULT CHARSET;
remove LOCK/UNLOCK commands;
make the INSERT commands have fewer records;
replace \' quoting with ''.
That is a MySQL Dump and not SQLite.
There are slight variations on the syntax.

Syntax error when storing Pig output

I am having some issues with storing my pig output to a file. This is what I am using to store:
'STORE rel INTO 'simple'; '
If I Dump 'rel' I get:
>(car,0.5,(door,tire,jello,truck,random))
(toy,0.5,(jeep,bunny toy))
(door,0.5,(car,jello,random))
>(jeep,0.5,(toy,bunny toy))
What I get in the file is:
<Yulias-MacBook-Pro:~ yuliatolskaya$ /Users/yuliatolskaya/Documents/misc/pig_clustering/simple/part-r-00000 ; exit;
/Users/yuliatolskaya/Documents/misc/pig_clustering/simple/part-r-00000: line 1: syntax error near unexpected token `('
/Users/yuliatolskaya/Documents/misc/pig_clustering/simple/part-r-00000: line 1: `car 0.5 (door,tire,jello,truck,random)'
logout
[Process completed] >
I am really not sure what the problem is, as there are no errors in the logfiles...Please Help!