|
From: Thomas S. <t.s...@fz...> - 2011-02-24 11:17:32
|
you could cut the first word (the line number) using awk:
history 10 '| head -5 | awk "{for(i=2; i<NF; i++) {printf(\"%s \", \$i)} ;
print \$NF}" > diary.gp'
warpino wrote:
>
> Hi all,
>
> I'm using Gnuplot development version 4.5. However I try I cannot make the
> "history" command behave as I wish.
>
> All history commands seem to yield the history command itself as the last
> issued command (sorry for the tongue-twister).
> This is a bit annoying as commands like:
>
> history [n] "filename"
>
> will write the last n commands PLUS the command 'history [n] "filename" '
> to
> file filename. So doing load 'filename' will also execute the latter,
> meaning that the file itself will change.
>
> history 10 "|head -5 >>diary.gp"
>
> behaves almost fine apart writing the command number at the beginning of
> each line, which makes file "diary,gp" useless.
>
> There's no way to combine the "quite" option and write to a file.
>
> Are this behaviours normal or should they be considered bugs?
>
> Regards,
>
> N.
> ------------------------------------------------------------------------------
> Free Software Download: Index, Search & Analyze Logs and other IT data in
> Real-Time with Splunk. Collect, index and harness all the fast moving IT
> data
> generated by your applications, servers and devices whether physical,
> virtual
> or in the cloud. Deliver compliance at lower cost and gain new business
> insights. http://p.sf.net/sfu/splunk-dev2dev
> _______________________________________________
> gnuplot-info mailing list
> gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
>
--
View this message in context: http://old.nabble.com/History-command-problems-tp30999908p31001678.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|