문제

Im trying to edit a script in geek tool (mac app for desktop widgets), could someone help me make this statement only print out 10 or so words per line?

curl -s www.brainyquote.com/quotes_of_the_day.html | egrep '(div class="bqQuoteLink")|    (ahref)' | sed -n '19p; 20p;' | sed -e 's/<[^>]*>//g'\

Just now everything is printed out on one big line.

I think i could use the awk command, although I am unsure how to do so on this output.

Any help would be appreciated !!

도움이 되었습니까?

해결책

Try running it through:

| fold -s

다른 팁

Add this to the end of your command

 | awk '{ print $1 $2 $3 $4 $5 $6 $7 $8 $9 }'

That should only print the first nine words per line, assuming they're space-delimited.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top