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.

3
  • 2
    Strange but interesting idea +1 Commented Jun 7, 2019 at 20:27
  • head -n 5 ./pom.xml > pomnew.xml echo "<packaging>war</packaging>" >> pomnew.xml tail -n +6 ./pom.xml >> pomnew.xml mv pomnew.xml pom.xml Commented Dec 5, 2022 at 5:03
  • You may compact this like this: (head -2 file.txt; echo row three ; tail -3 file.txt) > newfile.txt (using Gnu Linux tools). Commented Feb 23, 2023 at 21:32