Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 512  / 2 Years ago, thu, february 24, 2022, 6:10:54

When I go to visit this url



https://github.com/search?q=jquery+stars%3A>10+forks%3A<10&type=Repositories


using this command for lynx:



lynx -accept_all_cookies https://github.com/search?q=jquery+stars%3A>10+forks%3A<10&type=Repositories


First I get a code like this -> [1] 4324 then another line which says -> bash: 10: No such file or directory



So, question is how can I browse this url url lynx? Also I can not curl this url , curl also showing nearly like same.



I am using ubuntu 12.04 LTS


More From » 12.04

 Answers
6

The problem is that your URL contains special characters that are being interpreted by the shell because you are not quoting it. So, short answer, use quotes:



lynx -accept_all_cookies 'https://github.com/search?q=jquery+stars%3A>10+forks%3A<10&type=Repositories'


Long answer: The specific issues here are >10 and &. The & sends a job to the background:



$ sleep 5 &
[1] 2015


Note that the above causes a similar message to appear, the number in brackets is the job ID, in this case 1 since it is the only job running in the background and the other number is the process ID (PID) of the backgrounded process.



The next issue is the <10 which means "read input from the file called '10' and >10 which the shell interprets as "redirect output to a file called '10'`. For example:



$ echo "Hello" > 10
$ cat 10
Hello


All of these issues can be avoided if you simply quote such things, quoting will protect special characters from being interpreted by the shell.


[#26028] Thursday, February 24, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
clegian

Total Points: 283
Total Questions: 115
Total Answers: 115

Location: Morocco
Member since Tue, Feb 2, 2021
3 Years ago
;