Question

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

Was it helpful?

Solution

Try running it through:

| fold -s

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top