764 // cut trailing : number.
765 p = strrchr(buf, ":"[0]);
766 if(p)
767 *p = '\0';768 printf("\t{ %d, \"%s\", \"%s\" },\n", e, signals[i].name, buf);
769 }
770 printf("}\n\n");
111 delta_pct=$(echo "$head_pct - $target_pct" | bc -l)
112 echo "Delta: ${delta_pct}"
113
114 if [[ $delta_pct = \-* ]]; then115 echo "Regression!";
116
117 target_diff="${output_dir}/target.diff.txt"
Trying to escape something that has no special meaning when escaped. The backslash will simply be ignored here.
If the backslash was supposed to be literal, it is recommended to enclose it in a single quote or escape it.
If you wanted it to expand to something, rewrite the expression to use printf
(or in bash, $'\t'
).
Problematic code:
# Want literal backslash
echo Yay \o/
# Want other characters
bell=\
Correct code:
echo 'Yay \o/'
bell="$(printf '\a')