Sed extra characters after command

Follow along with the video below to see how to install our site as a web app on your home screen.

Forum Home. Linux and Unix Man Pages. Search Forums. Search Community Posts. Today's Posts. Quick Links.

Sed extra characters after command

Connect and share knowledge within a single location that is structured and easy to search. You need to replace with the command delimiter ;. Second, you can get the error because part of the replacement text is interpreted by sed. You actually need to quote the replacement string. This can be done with the bash parameter expansion operator Q. Q The expansion is a string that is the value of parameter quoted in a format that can be reused as input. Ubuntu Community Ask! Stack Overflow for Teams — Start collaborating and sharing organizational knowledge. Create a free Team Why Teams? Learn more about Teams. Asked 5 years, 4 months ago. Modified 5 years, 4 months ago. Viewed 7k times. I would like to take the first 2 lines from test.

Quick Links. When I can do the some of following in a script but not in a command line.

Connect and share knowledge within a single location that is structured and easy to search. I want to understand what is wrong with my command line. When I can do the some of following in a script but not in a command line. I have been working through the tutorial at www. When I got stuck at the section Working with Multiple Lines. These script works fine.

Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams. Connect and share knowledge within a single location that is structured and easy to search. For that I am using sed command like this. It actually prints all the occurence between line to but I want only first occurence. I have one alternate solution for this which is to pipe line the output and use head command.

Sed extra characters after command

Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams. Connect and share knowledge within a single location that is structured and easy to search.

Mens loincloth

Contact Us. I'm becoming a little more competent daily. Highest score default Date modified newest first Date created oldest first. Using the -i option doesn't change the syntax of the rest of the line. I have read many threads, but I still didn't find the right answer. Question feed. It has nothing to do with the file; sed didn't even begin to read the file. Code :. Here is an interesting problem that I am seeing when using 'sed'. Linux and Unix Man Pages. Thread Tools. When I got stuck at the section Working with Multiple Lines.

Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams. Connect and share knowledge within a single location that is structured and easy to search.

By continuing to use this site, you are consenting to our use of cookies. Forum Home. Page 1 of 2. You need to use a semicolon ; to separate sed commands on the same line. Hot Network Questions. Donate to FreeBSD. What's new New posts Latest activity. I have created a sed script to do the work I want. No semicolon is needed when there is a newline which is why your script form works. View Public Profile for vgersh Mark Forums Read. Sed error "sed: -e expression 1, char [ ]: extra characters after command" Ask Question.

0 thoughts on “Sed extra characters after command

Leave a Reply

Your email address will not be published. Required fields are marked *