Skip to content

Instantly share code, notes, and snippets.

@linhxhust
Created May 9, 2017 00:57
Show Gist options
  • Save linhxhust/132757112e192e53ef47ea10ac0d0ebd to your computer and use it in GitHub Desktop.
Save linhxhust/132757112e192e53ef47ea10ac0d0ebd to your computer and use it in GitHub Desktop.
#!/bin/bash
cdr_path="/path/to/cdr/rec/"
for cdr_file in `ls ${cdr_path}`
do
printf "Process file: ${cdr_file}\n"
file_path="${cdr_path}${cdr_file}"
ex +"%s/$/${cdr_file}/g" -cwq $file_path
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment