Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • awk '$1~/^[A-Z]/ {print $0 "\tappendagehere"}' file... Or, if you want sed: sed '/^[A-Z]/ s/$/\tappendagehere/' file Commented Nov 18, 2015 at 7:19
  • maybe use vi and learn to love the A (append to end-of-line) and . (repeat-last-command) commands. for a few dozen or a few hundred lines it's often easier and quicker to edit manually with a decent editor (such as vi). Commented Nov 18, 2015 at 7:51
  • ah I would but there is over 1000 lines I would need to edit unfortunately, and it's a script I wanted to create because it's a command I would need to run a couple times a year :( Commented Nov 18, 2015 at 7:53
  • But I think you guys really got me on the right track so far. When I finish troubleshooting I will make sure to upvote the answer :) Commented Nov 18, 2015 at 7:54
  • of those 1000+ lines, how many different matches are there? and how many different strings need to be appended? Commented Nov 18, 2015 at 10:06