I want to uncomment a line of a config file by replacing the line %% {some_string, []}, with {some_string, []} in the command line. I have tried a few different formats using sed: sed ‘s/%% {some_string, []},/{some_string, []}/’ filename sed “s/%% {some_string, []},/{some_string, []}/” filename sed “s/’%% {some_string, []},’/'{some_string, []}’/” filename sed ‘s/”%% {some_string, []},”/”{some_string, []}”/’ filename but every time
Tag: special-characters
PHP / Linux shell unwanted character
I have an HTML form (field with multiple lines) that feeds a PHP code that will read each line of the field, and generate a pdf file using the line string as name. My problem is that all but the last file have a trailing ‘?’ at the end of the file. I think that somehow the form is sending
Sending an arrow key with fprintf
I’m testing out pipes and have hit a little road block. I want to be able to simulate pressing the right arrow key through a file pointer opened by popen. The file pointer opens a display program on a different terminal, much like a projector. I would like to send a signal to advance the next image (the right arrow
what does $* mean in a shell script
What does $* exactly mean in a shell script? For example consider the following code snippet Answer It means all the arguments passed to the script or function, split by word. It is usually wrong and should be replaced by “$@”, which separates the arguments properly.