Quantcast
Viewing all articles
Browse latest Browse all 6159

Create a text file in linux terminal using input from a different text file

I have a text file, lets call it file A, and I need to create a new text file (file B) that contains only the first 3, and last 3 lines of file A, separated by three periods (...)

So if I type "cat file B", it should show:

 File A Line 1  File A Line 2  File A Line 3  ... File A 3rd last line File A 2nd last line  File A last line

I'm new to linux and the lecturer is not good at explaining these things. really not sure. The lesson is about I/O Redirection and text manipulation


Viewing all articles
Browse latest Browse all 6159

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>