A)
Input
================
testAAAA svc stream
#rexd sunrpc_tcp
#rstatd sunrpc_udp
batch file
================================================
copy D:\11\Input tmp0.txt
sed "/#/d" tmp0.txt > Output.txt
copy Output.txt D:\11
del tmp*.txt
Output
================
testAAAA svc stream
B) I add in ##infront of the testAAAA and add in echo No configuration found > Output.txt in the batch file.
Input
================
##testAAAA svc stream
#rexd sunrpc_tcp
#rstatd sunrpc_udp
batch file
================================================
copy D:\11\Input tmp0.txt
sed "/#/d" tmp0.txt > Output.txt
copy output.txt D:\11
echo No configuration found > Output.txt
del tmp*.txt
Output
================
No configuration found
But When i use the batch file from B and delete away the ##infront of testAAAA the output i get is No configuration found instead of testAAAA svc stream
How should i program it in order to suit both A and B
The result i want is when the input is all in ## my output is No configuration found. When there is a line in input that do not have # , my output will display the line.
Input
================
testAAAA svc stream
#rexd sunrpc_tcp
#rstatd sunrpc_udp
batch file
================================================
copy D:\11\Input tmp0.txt
sed "/#/d" tmp0.txt > Output.txt
copy Output.txt D:\11
del tmp*.txt
Output
================
testAAAA svc stream
B) I add in ##infront of the testAAAA and add in echo No configuration found > Output.txt in the batch file.
Input
================
##testAAAA svc stream
#rexd sunrpc_tcp
#rstatd sunrpc_udp
batch file
================================================
copy D:\11\Input tmp0.txt
sed "/#/d" tmp0.txt > Output.txt
copy output.txt D:\11
echo No configuration found > Output.txt
del tmp*.txt
Output
================
No configuration found
But When i use the batch file from B and delete away the ##infront of testAAAA the output i get is No configuration found instead of testAAAA svc stream
How should i program it in order to suit both A and B
The result i want is when the input is all in ## my output is No configuration found. When there is a line in input that do not have # , my output will display the line.