Answer the question
In order to leave comments, you need to log in
sed command not replacing words?
In theory, the sign should be replaced by , and thus the database should be replenished, but something went wrong
root:~/BOT# bash test.sh
ID: 123456789
[12345678, ${id}, 122345678 ,123453434, 1234534564]
root :~/BOT# cat users.txt
[12345678, 122345678 ,123453434, 1234534564]
root:~/BOT# cat test.sh
read -p "ID: " id
sed -e 's/,/, ${id}, /' users.txt
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question