Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

printf

Python’s many ways of string formatting — are the older ones (going to be) deprecated?

August 21, 2022 by Magenaut

Python has at least six ways of formatting a string:

Categories Python, Q&A Tags backwards-compatibility, deprecated, printf, python, string-formatting Leave a comment

Dashes in printf

August 10, 2022 by Magenaut

I’m trying to use printf to format some pretty output in a bash script

Categories Q&A, Unix & Linux Tags bash, printf Leave a comment

How can I print a variable with padded center alignment?

August 10, 2022 by Magenaut

How can I print $myvar padded so that it is in the center of the terminal, and to either side are = to the edge of the screen?

Categories Q&A, Unix & Linux Tags bash, printf, text-formatting, tput Leave a comment

Padding trailing whitespaces in a string with another character

August 9, 2022 by Magenaut

I’d like to output hello world over 20 characters.

Categories Q&A, Unix & Linux Tags bash, printf, shell, string Leave a comment

Why is printf “shrinking” umlaut?

August 9, 2022 by Magenaut

If I execute the following simple script:

Categories Q&A, Unix & Linux Tags bash, printf, unicode Leave a comment

Slightly confused about whether printf in the yash shell is a built-in command or not

August 8, 2022 by Magenaut

The yash shell has a printf built-in, according to its manual.

Categories Q&A, Unix & Linux Tags posix, printf, shell-builtin, yash Leave a comment

Bash printf formating not working

August 8, 2022 by Magenaut

For example, the c format does not work.
I’m input printf "ABCctest" to bash console and result;

Categories Q&A, Unix & Linux Tags bash, printf Leave a comment
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress