how to use `amp;` & `gt;` commands in linux-shell? how to use `amp;` & `gt;` commands in linux-shell? linux linux

how to use `amp;` & `gt;` commands in linux-shell?


I suspect this has undergone an HTML entity translation. You want to reverse this e.g.

& becomes &

and

> becomes >

So (for example)

cd /dir && ls > filename

would become

cd /dir && ls > filename


in other word, & is the character reference for "An ampersand". While gt is simply we call it as (greater than).


&amp and &gt are html escape codes for & and > respectively.

Either you have downloaded a script that has been htmlized, or you've accidentally downloaded a webpage with the script on.

Check the top line of the file. if it starts with something like #!/usr/bin/bash then it's the former and you just need to reverse the changes. If it has something like a <html> tag as the start, then you've downloaded the webpage - go back to where you got it and look for something like a 'raw' link