cd $path = No such file or directory

hi

just edited /etc/bash.bashrc where at the end added :

LIN=$LIN:/windows/D/LINUX/
export LIN

and I want have $LIN set as path to /windows/D/LINUX/ but I each time I type $LIN getting that error

andrzej:/etc # cd $LIN
bash: cd: :/windows/D/LINUX:/windows/D/LINUX:/windows/D/LINUX:/windows/D/LINUX/:/windows/D/LINUX/:/windows/D/LINUX: No such file or directory

I think its set because after typing env
can find these:

LIN=:/windows/D/LINUX:/windows/D/LINUX:/windows/D/LINUX:/windows/D/LINUX/:/windows/D/LINUX/:/windows/D/LINUX

so what am I missing to use that $LIN permanently ?

forgot to mention running 12.1 kde

> Code:
> --------------------
> LIN=$LIN:/windows/D/LINUX/
> export LIN
>
> --------------------

Remove $LIN:

it should be:


LIN=/windows/D/LINUX/
export LIN

hi,

removed $ and **: **, being root or user still getting the same message :

andre@andrzej:/etc> cd $LIN
bash: cd: LIN/windows/D/LINUX/: No such file or directory

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

No, that was not at all what VampirD wrote. Run, exactly, the two
commands he posted for you.

The reason he is correct is that your solution is concatenating what LIN
was before with what you are adding now (/windows/D/LINUX/) which means
you end up with a path, at first, of /windows/D/LINUX and the next time
you do it you end up with /windows/D/LINUX:/windows/D/LINUX and the next
time you end up with /windows/D/LINUX:/windows/D/LINUX:/windows/D/LINUX
and so on and so forth. Stop concatenating is basically what VampirD is
telling you which means every time you simply set it, whether already
set or not, to /windows/D/LINUX . Thankfully Linux can also consolidate
the two lines into one for simplicity

export LIN=/windows/D/LINUX

Good luck.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJO14s3AAoJEF+XTK08PnB5CEAQAK6vnLaPDbC9Ko1Bd3CLzKxx
j2jHsjHJN81oFBcoz3LAl3rncoDsil3QDXePtqR8xZla48OzHwAG18hd6GHf1+p1
DVkZ1EKtxNEPloAqN7nnJcIKHzjZUo43dliigGhgbVXDtNEdymN0FETPBkWFNcr2
QJWlrDVtycQ3GiGbtH6XV+PLievOG6F8UE7d7Nl4EbqIF6bQB8BHHxA0yR3s5Dey
71PPiX//TPWKSiIjWo6rBytVRSPSh7u5QAkfz4zib4hInTAWoDdFfBb1vgieUNQZ
Crqj4s5RRtYsCMAwBtKixN+Y4KrBe5lgdxDSDPxb6qYAQLspmb8xmyLmFPpLe5Md
nTv+SYL/gQyd9lQ4/6uyvnv85e3JSap8jDUoTmlHj8K21Qc0hDaocGAND1es6bW0
RPv6zcOXo8lVYtDY7wggYSwp8ZiIycoWEf1R4ujc2UTtGk7U6CPmg+r7Fm4s5jC8
Kio1BxARzh2DJXTAGgTa/c+x3Pr6wo95c9KvfDHzqJn5xlHD05rUhpG85fjy2bH5
Sd1/bbU7HS8VeHxeFBVNIKB89fm70u50FJPqNWTUbYUcVEKx5r9tMqr9t89jPECe
OSW9dSRQyCMTqmveYYGpRDFpAzvwRVKNAvIMKSGJ+r+PXp+nChqScWTBz4QyuCGy
jPq7YW61xuyBFOGkiegQ
=THFf
-----END PGP SIGNATURE-----

yes I run the commands VampiD wrote and it worked until I rebooted now it again shows same error…
I want make it permanently.
?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Find where you have your original lines in a script as you set them up
(~/.bashrc, ~/.profile, /etc/bash.bashrc, /etc/profile.d/*, or something
similar) and fix things there too. Nothing is permanent unless it is
written to a file so you must find the file where you put the broken
commands and fix them.

Good luck.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJO15nXAAoJEF+XTK08PnB5z6AQAKtXdjXAL6F8KrqUp9Teagfq
CtEzyP9mDgr4x07yKTa1jJemA2Btca0V8l5OBwVSdn+Wdg3d0HutwvDz01bd7gxd
7gcrv3wHI0kMlh63KkOHc6Fq0mbTXozfhj+rp6aqWf1d/IeioEgb1jUWldrRSYD3
Q4O7HKBJfZPpttSsdpHb4T+qW7AVtD0ksiVi/TU52MSqXp+cJZcThsqtDTIcOGwV
LfVPY/HvQ7z1ZYtXAIRgycqcQV8VjRVrd/R00O/XpnLBAJLHzDk1Oi+DYONQhOn6
3LFKp83yR63xcnFF1qLR77Th1Ih0C+LZwTzE6MrV2omCj52fGdWIscgqscAMqwMs
WWIjGH0pVTxOdk5mj9QbpaTkKN/aO+ltOrcf/oPlTwRluLRagVq61FG/DRaZroTy
aP0Lbdp2LfYzahpbOrBOdFOIuey1GEYRMICTgfci/FTFWz95wKbrHK9WvaPosdJ1
B2kuVaqCfx6ReEO4MJ1VbiSGphHdEk+kJEEyBOLaVnGoyorAN9y+rq/G8NjJQldo
ZBVuyPvjg7pEOnriYea7VK3RnGOcyucf2FDfpJrGjjFh9e7bKGuNor8Pf87HNVp+
Gkrk1FxQEPvBgs+fckSKYoda7YpB6WIBjq03m1oZvqbI5U0hvHhEBBXqUqeLbKEH
A4Ru+GHQ0hbbUc+LEhxj
=5VvK
-----END PGP SIGNATURE-----