ASSIGN Win XP的命令行输出变量 [英] ASSIGN win XP commandline output to variable
本文介绍了ASSIGN Win XP的命令行输出变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从Linux壳下面的脚本转换到Windows XP外壳
i would like to translate a following script from linux shell to Windows XP shell
GPSID=$(awk '/GPSID/ {print $3}' gora.RTK )
awk -v variable=${GPSID} 'BEGIN {printf "Numer seryjny : " variable,$1}' >>out.txt
第二行已被翻译;问题是定义包含Windows Shell中输出的变量: - (
The second line has been translated; the problem is with defining a variable that contains shell output in windows :-(
推荐答案
固定确定问题
for /f "tokens=*" %%a in ('awk "/GPSID/ {print $3}" gora.RTK ') do set var=%%a
awk "BEGIN {printf \"GPSID : \" }" >out.txt
echo %var% >>out.txt
这code basicly做什么,我想做的事。
This code basicly does what I wanted to do.
您是伟大的谢谢!!!!!
You are great Thanks !!!!!
这篇关于ASSIGN Win XP的命令行输出变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文