Skip to content
Advertisement

Tag: special-characters

Replacing strings with special characters in command line sed

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

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

Advertisement