/*
** Project "OrderCache.7.7.29"
** Hint: deleting everything below the "cause" field will set
** the defaults appropriately for the cause you have chosen.
*/
brief_description = "none";
description = "none";
cause = internal_bug;
test_exempt = true;
test_baseline_exempt = true;
regression_test_exempt = true;
architecture =
[
"unspecified",
];
I wanted to replace the "brief_description" with a value given by the user. So:
#!/bin/csh
set DESC = "$<"
But when I tried to use sed with $DESC:
sed -i 's%brief_description\ \=\ \"none\"\;%brief_description\ \=\ \"$DESC\"\;%g' temp_next.txt
the command would only change "brief_description" as follows:
brief_description = "$DESC";
The reason for this is that the variable has to be inside double quotes in order to get it dereferenced back to the actual value. So the solution is:
sed -i 's%brief_description\ \=\ \"none\"\;%brief_description\ \=\ \"'"$DESC"'\"\;%g' temp_next.txt
No comments:
Post a Comment