Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #4435

sprintf: max number of characters printed?

Newsgroups comp.graphics.apps.gnuplot
Date 2021-11-02 10:00 -0700
Message-ID <8752a15b-a23d-416b-9bf1-9e4e5cb341e5n@googlegroups.com> (permalink)
Subject sprintf: max number of characters printed?
From Konstantinos Anagnostopoulos <k.n.anagnostopoulos@gmail.com>

Show all headers | View raw


Hi I am trying to write a string to be used as a command in a script.

When the filenames are too long the string get truncated. See e.g.:

files="aaaD_01.ava0 aaaD_02.ava0 aaaD06N0012n0004s+01.0000k001.0000B001.0000K000.9368i-02.2617e+00.0000m+01.0000g02.ava0 1234567890123456789012345678901234567890123456789001234567890012345678900123456789001234567890"

do for [f in files]{ print sprintf("head %s|awk '/srkappa/{printf \"(\%7.4f,\%7.4f)\",$4,$5}'",f)}

Produces the output:

head aaaD_01.ava0|awk '/srkappa/{printf "(%7.4f,%7.4f)",$4,$5}'
head aaaD_02.ava0|awk '/srkappa/{printf "(%7.4f,%7.4f)",$4,$5}'
head aaaD06N0012n0004s+01.0000k001.0000B001.0000K000.9368i-02.2617e+00.0000m+01.0000g02.ava0|awk '/srkappa/{printf "(%7.4f,%7.4f)",$
head 1234567890123456789012345678901234567890123456789001234567890012345678900123456789001234567890|awk '/srkappa/{printf "(%7.4f,%7


i.e. the last two commands are incomplete. Is there a way to control this output? Thank you.

I am suing gnuplot 5.2 patchlevel 8    last modified 2019-12-01 on ubuntu 20.04.

Back to comp.graphics.apps.gnuplot | Previous | NextNext in thread | Find similar


Thread

sprintf: max number of characters printed? Konstantinos Anagnostopoulos <k.n.anagnostopoulos@gmail.com> - 2021-11-02 10:00 -0700
  Re: sprintf: max number of characters printed? Konstantinos Anagnostopoulos <k.n.anagnostopoulos@gmail.com> - 2021-11-02 10:40 -0700

csiph-web