Firenze, dà fuoco al drappo nero sul David per la guerra in Ucraina: arrestato
12 Marzo 2022Firenze, la manifestazione “Cities stand with Ukraine”. In collegamento il presidente Zelensky
12 Marzo 2022How to trim leading and trailing white space in bash
So I have this specific use case where I get data in a comma-separated values (CSV) file. I pick up the company name, address, telephone, email, and some other data from that file. Once data is collected, I create a final pdf using a simple script. Unfortunately, data comes with unwanted leading and trailing white spaces in each field. So my final pdf file gets messed up because of those white space. Let us see how to trim leading and trailing white space for a string in Bash running on Linux or Unix machines.
Love this? sudo share_on: Twitter – Facebook – LinkedIn – Whatsapp – Reddit
The post How to trim leading and trailing white space in bash appeared first on nixCraft.