There are times when all I need to do is inspect the beginning three to five lines of a file rather than load the whole thing -- just to see if the file has a file header and give me an idea what data values I'm getting prior to loading into my databases.
In those cases I need TextPad simply as a file inspecter rather than an editor. I don't need the whole file loaded. Especially when the file is HUGE! We're talking about 500 megabytes and higher.
If the TextPad programmer can add the option to load just the first few lines and stop loading - it would be a big time saver and a big convenience.
The option to peek into a file rather than load it
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
If you have perl installed (and who doesn't? ), here's a cheap "head" function:
(This works in a Command Window, you might have to play with the quoting, etc. to make it a tool.
The only problem is that textpad doesn't have a generic file selector dialog to feed a filename easily to a tool. The best you could do is to type in the filename using the "prompt for parameters" option, unless I'm missing something.
Code: Select all
perl -pe "exit if $. > 5" file.txt
The only problem is that textpad doesn't have a generic file selector dialog to feed a filename easily to a tool. The best you could do is to type in the filename using the "prompt for parameters" option, unless I'm missing something.