Article 53NWB [SOLVED] loading variables error - bash: //: No such file or directory

[SOLVED] loading variables error - bash: //: No such file or directory

by
andrew.comly
from LinuxQuestions.org on (#53NWB)
In keeping a list of commands needed to restore an installation of my Trisquel Mini 8.0, I use variables to store common addresses, and to avoid duplicate work I keep all my variables for both restoring and backing up in one file "variables" stored in /usr/local/bin:
Code:$ ls -l ..
total 48
drwxr-xr-x 11 a adm 20480 May 19 10:30 bin
drwxr-xr-x 2 root root 4096 Apr 17 2018 etc
drwxr-xr-x 2 root root 4096 Apr 17 2018 games
drwxr-xr-x 2 root root 4096 Apr 17 2018 include
drwxr-xr-x 4 root root 4096 Apr 17 2018 lib
lrwxrwxrwx 1 root root 9 May 16 18:02 man -> share/man
drwxr-xr-x 2 root root 4096 Apr 17 2018 sbin
drwxr-xr-x 10 root root 4096 May 17 12:24 share
drwxr-xr-x 2 root root 4096 Apr 17 2018 src

$ ls -l variables
-rwxrwxr-x 1 a adm 6874 May 18 18:11 variablesSo recently during a restoration of my previous operating system along with many of the previous configurations I executed the following command:
Code:sudo su
<<I entered in my psw>>
file="etc/xdg/lxsession/${lxSessionProfile}/autostart";
sudo echo "@xcompmgr -n -cfF -t-9 -l-11 -r9 -o.95 -D6 &" >> /${file}and the pertinent contents of variables are:
Code:#Session Profile
# **Look in the folder /etc/xdg/lxsession/
lxSessionProfile=Trisquel-miniUnfortunately it seems that even though I had previously loaded my variables with the command:
Code:. variablesbut that was before I had logged in as su(root), so resultingly ${lxSessionProfile} wasn't already defined, and it seems that bash interpreted above cmd as:
Code:sudo echo "@xcompmgr -n -cfF -t-9 -l-11 -r9 -o.95 -D6 &" >> /etc/xdg/lxsession//autostartThe unfortunate result is the mere annoyance of the following GARBLE whenever I loaded that file:
Code:bash: //lx: No such file or directoryIs there any way to get rid of this garble?latest?d=yIl2AUoC8zA latest?i=KExFnLJ0FXM:fWwPMqpe6ZI:F7zBnMy latest?i=KExFnLJ0FXM:fWwPMqpe6ZI:V_sGLiP latest?d=qj6IDK7rITs latest?i=KExFnLJ0FXM:fWwPMqpe6ZI:gIN9vFwKExFnLJ0FXM
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments