Bug 10926 - Please add support for -v option in printf
Summary: Please add support for -v option in printf
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All All
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-07 12:08 UTC by Ale
Modified: 2018-04-09 08:47 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ale 2018-04-07 12:08:55 UTC
Please add support for -v option in printf:
-v VAR	If given, the output is assigned to the variable VAR instead of printed to stdout (comparable to sprintf() in some way)

Example:
val1="111"
val2="222"
printf -v var '%s_%s' "$val1" "$val2"
echo "$var"