[Q] How to use "grep" to search the "build.prop" topic
Hey guys! :D
I am new to this forum, and needed some extra help
I am trying to add a line of text to "Build.prop" from a file Test.sh
But if you run the code again, the same line is created
I'm trying to do it this way, but does not give any results
Can someone help me solve this problem? :confused: :D
I am new to this forum, and needed some extra help
I am trying to add a line of text to "Build.prop" from a file Test.sh
Code:
echo "#Test" >> /system/build.prop
But if you run the code again, the same line is created
I'm trying to do it this way, but does not give any results
Code:
if [ $(grep "#Test" /system/build.prop) ]; then
sed -i '/Test/d' /system/build.prop;
else
echo "#Test" >> /system/build.prop;
fi
Can someone help me solve this problem? :confused: :D
xda-developers
0 commentaires:
Enregistrer un commentaire