I am new to C#, I have to write a Linux code via C# script in a text file, but facing issue in writing " to in MyText file.
C# code gives error in MyText string.
string MyText = "#!/bin/bash\n" +
"_dbInput=/root/input.csv\n" + **(should be "_dbInput="/root/input.csv"\n" +)**
"sleep 0.5\n" +
"_linect_total=$(cat $_dbInput | wc -l)\n" +
"sleep 2\n";
I need output like below
"_dbInput="/root/input.csv"\n" +
"rm –rf /tmp/filename.txt"
Need " (Double-Quote) to printed in text file MyText.. Need suggestion how can I achieve this.
Regards,