#!/bin/bash

if [[ -n $1 ]]; then
  SCRN_FILE=$1
else
  echo
  echo "Usage: screen_clean.sh  <screen file name>"
  echo
  exit 1
fi

# cat -v $SCRN_FILE | tr -d '^@' >> "${SCRN_FILE}.cln.log"
cat -v $SCRN_FILE  |  sed 's/^@^M//g' > "${SCRN_FILE}.cln.log"
echo "--> ${SCRN_FILE}.cln.log"
