wizrddreams
May 28th, 2015, 06:09 PM
I am setting up my system for ease of use with Python. (Hopefully)
I am add the following lines to the .bashrc file:
pyversion='python -c 'import sys; print sys.version.split()[0]''
export PYTHONSRC=$SYSDIR/src/python/Python-$pyversion
Running that command in terminal:
python -c 'import sys; print sys.version.split()[0]'
Yields:
2.7.10
So pyversion should be 2.7.10
However I get the following errors from the .bashrc when I start up a new terminal:
bash: /home/kblawlor/.bashrc: line 128: syntax error near unexpected token `('
bash: /home/kblawlor/.bashrc: line 128: `pyversion='python -c 'import sys; print sys.version.split()[0]'''
I am wrapping the whole line of working code in these quotations ''
Does anyone know how to get this to work?
For some reason the .bashrc line of code is not communicating itself to the terminal properly. (So it seems)
I think it may be the way I am using quotations.
I am add the following lines to the .bashrc file:
pyversion='python -c 'import sys; print sys.version.split()[0]''
export PYTHONSRC=$SYSDIR/src/python/Python-$pyversion
Running that command in terminal:
python -c 'import sys; print sys.version.split()[0]'
Yields:
2.7.10
So pyversion should be 2.7.10
However I get the following errors from the .bashrc when I start up a new terminal:
bash: /home/kblawlor/.bashrc: line 128: syntax error near unexpected token `('
bash: /home/kblawlor/.bashrc: line 128: `pyversion='python -c 'import sys; print sys.version.split()[0]'''
I am wrapping the whole line of working code in these quotations ''
Does anyone know how to get this to work?
For some reason the .bashrc line of code is not communicating itself to the terminal properly. (So it seems)
I think it may be the way I am using quotations.