linux - Error with sed option -


i have created script in script have variable

 ... line 1 ...  ... line 2 ...  num_ligne_pop3_server_name=15  ... line 4 ... 

i execute command:

pop3_server_name=$( sed -n '$num_ligne_pop3_server_names/.* = //p' /applis/diapason/$rep_install/conf/mail/$fic_file_manager) 

i have error:

sed: -e expression n°1, caractère 8: commande inconnue: `/'

try using double quotes allow variable substitution, , using braces env var name.

pop3_server_name=$( sed -n "${num_ligne_pop3_server_name}s/.* = //p" /applis/diapason/$rep_install/conf/mail/$fic_file_manager)                            ^ ^                          ^          ^ 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -