Timeline for sed mac insert tab and text at specific line
Current License: CC BY-SA 4.0
23 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 30, 2018 at 19:31 | comment | added | Crystal | I updated my question with what I think you asked me to do with the output. | |
| Oct 30, 2018 at 19:31 | comment | added | Crystal | Let us continue this discussion in chat. | |
| Oct 30, 2018 at 19:27 | comment | added | Mario Camou | Thanks for marking it, but I'd really like to help you solve your problem | |
| Oct 30, 2018 at 19:07 | comment | added | Mario Camou | Just copy the tab character between the brackets on the second answer to the question I linked to, and paste it where you need it | |
| Oct 30, 2018 at 19:05 | vote | accept | Crystal | ||
| Oct 30, 2018 at 19:05 | comment | added | Crystal | so you are saying to open up vim, hit ctrl+q then tab, save it, then run that file? if that's what you mean, i tried it and it did not work. but at this point i'll just mark it as answered. thanks. | |
| Oct 30, 2018 at 19:01 | history | edited | Mario Camou | CC BY-SA 4.0 |
added 309 characters in body
|
| Oct 30, 2018 at 19:00 | comment | added | Mario Camou |
OK, that complicates things a bit, vs code doesn't support quoting. You might try one of these solutions instead of the <Ctrl+Q><Tab> trick: stackoverflow.com/questions/45566785/… (copy and paste is probably easiest, but if you constantly need to insert tabs you might want to go with the keybinding)
|
|
| Oct 30, 2018 at 18:55 | comment | added | Crystal | I’m just editing that sed command in vs code | |
| Oct 30, 2018 at 18:55 | comment | added | Mario Camou |
it will work (I tried it) but how exactly to insert the tab depends on the editor that you're using. I usually use vim but it works on emacs too. nano doesn't need the Ctrl+Q at all. Which editor do you use?
|
|
| Oct 30, 2018 at 18:40 | comment | added | Crystal | I’m not sure if I u sweat and the tab part. I’m running this sed command as part of a script so I don’t think those commands work. That’s why I was trying the printf route. | |
| Oct 30, 2018 at 18:37 | history | edited | Mario Camou | CC BY-SA 4.0 |
added 594 characters in body
|
| Oct 30, 2018 at 18:33 | comment | added | Mario Camou | Gotcha. Sorry about that, I got wrapped up with getting the quote characters right rather than in how to enter the tab character. Is this better? | |
| Oct 30, 2018 at 18:32 | history | edited | Mario Camou | CC BY-SA 4.0 |
added 594 characters in body
|
| Oct 30, 2018 at 16:08 | comment | added | Crystal | sed works in that i can replace the text i want. but my question was how to insert a tab with sed at a specific line. but yes i do mark questions as answered once they are answered. | |
| Oct 30, 2018 at 16:06 | comment | added | Mario Camou | Did the last edit work? If so I would appreciate it if you marked it as the answer. | |
| Oct 25, 2018 at 19:14 | history | edited | Mario Camou | CC BY-SA 4.0 |
Delete extra backslash
|
| Oct 25, 2018 at 19:14 | comment | added | Mario Camou | Never mind that... what needed escaping was just the initial backslash. Try it now. | |
| Oct 25, 2018 at 19:07 | history | edited | Mario Camou | CC BY-SA 4.0 |
Escape the backslashes and the double quotes
|
| Oct 25, 2018 at 19:04 | comment | added | Mario Camou | Oh sorry, I forgot that when you use double quotes you also need to escape the backslashes and add additional backslashes to the double quotes in the string itself. I've updated the answer accordingly. | |
| Oct 25, 2018 at 18:51 | comment | added | Crystal |
that doesn't work on mac. i get the error: command i expects \ followed by text the examples i see use single quotes like this in the post: stackoverflow.com/questions/25631989/…. but it doesn't work with the double quotes like you posted. would be glad to try something else?
|
|
| Oct 25, 2018 at 4:55 | review | First posts | |||
| Oct 25, 2018 at 6:47 | |||||
| Oct 25, 2018 at 4:51 | history | answered | Mario Camou | CC BY-SA 4.0 |