Windows cmd中的Unix“Cat”等效命令 [英] Unix 'Cat' equivalent command in Windows cmd

查看:2427
本文介绍了Windows cmd中的Unix“Cat”等效命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在unix和windows环境中编写一些脚本。我在尝试编写等效的Windows命令时遇到问题:

  cmd =cat raw_data.txt | awk -F\\ } \'{for(i = 1; i <= NF-1; i ++){print $ i\} \}}'| sed's / ^,//'| sed' / ^ [\t] * //; s / [\t] * $ //'| sed's / ^ {//; s /} $ //'


解决方案

 类型file1> file2 
as
cat file1 file2> file3

类型是等价于cat命令的类型,但它只能具有其功能的一部分


I have being trying to write some scripts in both unix and windows environment. I am facing problem when trying to write equivalent windows command for:

cmd = "cat raw_data.txt | awk -F\"}\" '{for(i =1; i<=NF-1; i++){print $i\"}\"}}' | sed 's/^,//' | sed 's/^[ \t]*//;s/[ \t]*$//' | sed 's/^{//; s/}$//'"

解决方案

type file1 >> file2
as 
cat file1 file2 > file3

type is the one used equivalent to cat command but it can have only part of its functionality

这篇关于Windows cmd中的Unix“Cat”等效命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆