This is a simple python program that pulls the first and last line of a file
- Edit head_tail.py and change input_filename and output_filename
- Ensure that head_tail.py is in the same directory as your desired input_file
- Run code
1: Open in VS Code, text editor, IDE, or command line to edit lines 2 and 17 with the file names of your input file and output file.
2: If your head_tail.py is not in the same directory as input file, you will need to add additional code to search through directories to find the file. This simplifies it a bit :)
3: Either run in your IDE or using command line with:
cd downloads
py head_tail.py
I hope this code helps in your scientific endeavors, feel free to use and edit :)