samedi 9 mai 2015

Same commands, different results

I saw a weird behavior in my bash terminal. I run same commands on my terminal command line, but get different results. Following lines are copied-pasted from my bash terminal windows:

me@me:~$ ls "/media/me/My Passport/Archive U/‌"
ls: cannot access /media/me/My Passport/Archive U/‌: No such file or directory
me@me:~$ ls "/media/me/My Passport/Archive U/‌"
Backup  Documents  Downloads  Music  Pictures  Videos

I tried both commands using up arrow key (to bring previous commands to the current line) many times and the result does not changes. To be sure that the command has no hidden character, I selected both commands and pasted it to an spreed sheet and converted each character to its code and compared. there was no difference. I tried to select each commands and right-click, choose Copy, right click again, choose paste. If I copy-paste first command, I get first result. I f I copy-paste second command, I get second result!!!

Could any one say what is the difference between two commands? I guess no one could!

I tell you what is the difference. First command is copied and pasted from a text file!

I am using Ubuntu 14.04.

Aucun commentaire:

Enregistrer un commentaire