Description
Hello Haoel! At very beginning, I really like what comments.sh does, thanks. I got some problems with the scripts. Following is the messages and info. Do you have any advice for it?
[root@localhost leetcode]# ./comments.sh https://oj.leetcode.com/problems/largest-number/ largestNumber.cpp
./comments.sh: line 80: /usr/bin/xidel: cannot execute binary file
LargestNumber.cpp updated !
line 80: xidel ${leetcode_url} -q -e "css('div.question-content')" |
xidel ${leetcode_url} -q -e "css('div.question-content')" |
grep -v ' ' |sed '/^$/N;/^\n$/D' |
sed 's/^/ * /' | sed "1i/$(printf '%.0s' {0..80}) \n * " |
sed "$a \ $(printf '%.0s_' {0..80})_/\n" > /tmp/tmp.txt
[root@localhost leetcode]# ls -t
LargestNumber.cpp xidel comments.sh
[root@localhost leetcode]# ls xidel/
changelog install.sh readme.txt xidel xidel-0.8.4.linux64.tar.gz
Following is what the scripts gen:
// Source : https://oj.leetcode.com/problems/largest-number/
// Author : Edward Wang
// Date : 2015-02-04