File: ansi_clean.bash

package info (click to toggle)
python-es-client 9.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 576 kB
  • sloc: python: 2,815; sh: 239; makefile: 17
file content (8 lines) | stat: -rw-r--r-- 194 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
#!/bin/bash

ansi_clean () {
  # This function is separate so nobody touches the control-M sequence 
  # in the second sed stream filter
  echo ${1} | sed -e 's/\x1b\[[0-9;]*m//g' -e 's/
//g'
}