1

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 !!

Kevvvvyp
  • 1,704
  • 2
  • 18
  • 38

2 Answers2

4

Try running it through:

| fold -s
Scrutinizer
  • 9,608
  • 1
  • 21
  • 22
2

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.

mjuarez
  • 16,372
  • 11
  • 56
  • 73