File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 160160# 2) the last two `sed` commands are used to add the comments tags
161161case $FILE_EXT in
162162 .cpp ) xidel ${leetcode_url} -q -e " css('div.question-content')" | \
163- grep -v ' ' | sed ' /^$/N;/^\n$/D' | fold -w 85 -s | \
163+ grep -v ' ' | sed ' /^$/N;/^\n$/D' | fold -w 85 -s | \
164164 sed ' s/^/ * /' | sed ' 1i\' $' \n ' " /*$( printf ' %.0s*' {0..85}) " $' \n ' | \
165165 sed ' 2i\' $' \n ' ' !@#$%' $' \n ' | sed ' s/!@#$%/ */' | \
166166 sed ' $a\' $' \n ' " *$( printf ' %.0s*' {0..85}) */" $' \n ' | \
167167 sed ' s/^*/ /' > /tmp/tmp.txt
168168 ;;
169169 .sh ) xidel ${leetcode_url} -q -e " css('div.question-content')" | \
170- grep -v ' ' | sed ' /^$/N;/^\n$/D' | fold -w 85 -s| \
170+ grep -v ' ' | sed ' /^$/N;/^\n$/D' | fold -w 85 -s| \
171171 sed ' s/^/# /' | sed ' 1i\' $' \n ' " #$( printf ' %.0s#' {0..85}) " $' \n ' | \
172172 sed ' 2i\' $' \n ' ' #' $' \n ' | sed ' $a\' $' \n ' " #$( printf ' %.0s#' {0..85}) " $' \n ' \
173173 > /tmp/tmp.txt
You can’t perform that action at this time.
0 commit comments