User Tools

Site Tools


scripting:bash:cleaning

Cleaning

Developpers took years to develop a very NOT usefull feature: copy/paste with formatting ( by default !) To clean script where outputs is “hallucinating” like:

# ./script.sh
./script.sh: line 1: !#/bin/bash: No such file or directory

Solution

 sed -i '1s/^.*#//;s/\r$//' script.sh
scripting/bash/cleaning.txt · Last modified: 2023/06/15 08:36 by warnaud