code.fastix.org

Dateiansicht:

Datei:Projekte -> Linux,Shell(sh, bash)-Trimmen eines Strings -> trim.sh
md5:e8fc4d3eb820e0bc878bc8d2d89df607
sha1:fbaf37f2f5848a1963f36bce084649e61b94d31e
Download-Link:Download
  1. #!/bin/bash
  2.  
  3. # $home/bin/trim.sh
  4.  
  5. ## USAGE:
  6. # echo -e "\t \thallo\n \twelt\n   Hallo Welt" | trim.sh
  7. # program | trim.sh
  8. # trim.sh < file
  9.  
  10. while read str; do
  11.    echo $str;
  12. done