I have a file originally provided from a SQL database on a Windows platform.

I transfer the file via ftp in binary format, remove the ^M's from the end of all lines.

I have attempted to use tr ( cat infile | tr -d '\240' ) and sed (cat infile | sed 's/\240//g' ) to remove the occurences of \240 in the file with no luck.

I have no problem removing this octal character in vi.

If i run the Windows command, 'type infile', \240 shows up as an a with a grave over it.

In notepad, it shows up as a space.

I need to incorporate into a script a method of deleting these octal characters because other unix commands fail w/ the following error:

can't read STDIN: Illegal byte sequence

Any ideas would be greatly appreciated.

Thx in advance,

pat

cat test.cpp | tr '\240' ' '>111.txt

cat 111.txt | tr -d '\302'>555.txt

最新文章

  1. [.NET] 怎样使用 async & await 一步步将同步代码转换为异步编程
  2. poj 3280 Cheapest Palindrome
  3. Python’s SQLAlchemy vs Other ORMs[转发 7] 比较结论
  4. Apache Thrift 跨语言服务开发框架
  5. 拔靴法--Bootstrap--R语言实现
  6. 使用XML序列化器生成XML文件和利用pull解析XML文件
  7. 15条变量&方法命名的最佳实践【转】
  8. for name in loop Shell
  9. python脚本工具-1 制作爬虫下载网页图片
  10. AIX filesystemcache引发的Oracle事故
  11. 模板:强连通分量&2-sat
  12. #include <iostream>
  13. 17、Map接口及其常用子类(Hashtable、HashMap、WeakHashMap)
  14. JS实现时钟特效
  15. js 获取多少天前
  16. Travel 并查集
  17. HTML基础-------最初概念以及相关语法
  18. Appium测试,定位H5元素(HTML5)
  19. Web开发(调试方法 F12)
  20. C# 密码盐码加密

热门文章

  1. FCKEditor2.x整合教程-Xproer.WordPaster
  2. lshw查看系统硬件信息
  3. OpenCV实现pHash哈希
  4. linux 学习管道 和重定向
  5. Mac OS X Yosemite & Arduino安装CH340 USB转串口驱动
  6. delphi添加.ocx后缀的控件
  7. Backup--压缩备份和TDE
  8. Windows解决多版本python执行pip3时出错AttributeError: module 'enum' has no attribute 'IntFlag'?
  9. C语言编程学习:使用函数必须知道的3点注意事项
  10. 4.Python的版本