Guest User

Untitled

a guest
Jan 11th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. until [ -z $1 ]; do
  4. unix2dos $1 2>/dev/null
  5. iconv -f UTF-8 -t GBK $1 -o /tmp/unix2doc.tmp 2>/dev/null
  6.  
  7. if [ $? -eq 0 ]; then
  8. mv /tmp/unix2doc.tmp $1
  9. echo "linux2win: converting file $1 to WIN format ..."
  10. else
  11. rm -rf /tmp/unix2doc.tmp
  12. echo "linux2win: converting file $1 is not Linux format ..."
  13. fi
  14.  
  15. shift
  16. done
Add Comment
Please, Sign In to add comment