Created
November 22, 2022 23:35
-
-
Save salsferrazza/0d1ecd29a60207be6e02265689b6e341 to your computer and use it in GitHub Desktop.
Split lines by first instance of a space
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| while read -r line | |
| do | |
| export UOM=$(echo ${line} | cut -f1 -d" ") | |
| export s=" " | |
| export DESC=${line#*$s} | |
| echo "<value enum='${UOM}' description='${DESC}'/>" | |
| done < /var/tmp/uom.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment