About 50 results
Open links in new tab
  1. bash - Printf formatting with variable format - what does this var ...

    Mar 24, 2015 · The simplest form for the field width specifier is an integer: this asks printf to use at least this many characters for printing. If the corresponding parameter requires fewer …

  2. Where to find printf formatting reference? - Unix & Linux Stack …

    Where is the offline reference of the format specifiers (e.g., %i, %s) which are supported by the Bash/system printf command? I've looked in help printf, man 1 printf and man 3 printf without …

  3. Using printf with AWK to format my output correctly

    Apr 16, 2021 · I'm trying to format some output using printf with awk. Basically, I want the final format to look like this (everything is tab-separated.) chr10 100000624 100000625 …

  4. Printf formatting a ZSH variable without forking?

    Apr 3, 2022 · The printf utility in both bash and zsh has a -v option that allows you to "print into a variable": printf -v MYEPOCH "%'d" ${EPOCHSECONDS} The actual result of the above …

  5. printf outputs rows, not columns - Unix & Linux Stack Exchange

    Apr 4, 2019 · 1 Your format specifiers don't match up to the number of elements present in each array. Once your array expansion happens, there are multiple words generated each needs a …

  6. Does printf have an "engineering" notation format for numbers?

    Sep 28, 2017 · 7 Say I have this number: 105000000, in this form I can't easily see how big it is, so using printf at a prompt I try using the "scientific" notation: % printf "%.3E" 105000000 …

  7. Why does printf print more arguments than expected?

    Jun 21, 2015 · The format operand shall be reused as often as necessary to satisfy the argument operands. Any extra c or s conversion specifiers shall be evaluated as if a null string argument …

  8. bash - printf - store formatted string output in a variable - Unix ...

    May 9, 2024 · printf - store formatted string output in a variable Ask Question Asked 1 year, 7 months ago Modified 1 year, 7 months ago

  9. How to correctly format the output with Awk printf command?

    I am trying to format this file using awk printf to have the following desired format: keep the same order of fields (left-->right) have comma ", " FS only for the l ast three fields ($5, $6, $7) having …

  10. Using echo or printf to print out new line and carriage returns as …

    Jun 16, 2021 · print them out how? if they're in variables, echo and printf would by default print them out quite literally, as the actual CR and LF characters. Is that what you want, or do you …