Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Operating System
help merging many gps .log files into 1 .log file
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Raz0rEdge" data-source="post: 1506088" data-attributes="member: 110816"><p>Are the .LOG file just text or something else? Can you open them in TextEdit and have them show something legible? If so, you can use a simple Terminal command to combine them all with something like:</p><p>[CODE]</p><p>cat *.log >> final.log</p><p>[/CODE]</p><p></p><p>For example</p><p>[CODE]</p><p># ls -l </p><p>-rw-rw-r-- 1 <user> <group> 4 Mar 28 12:39 one.log</p><p>-rw-rw-r-- 1 <user> <group> 6 Mar 28 12:39 three.log</p><p>-rw-rw-r-- 1 <user> <group> 4 Mar 28 12:39 two.log</p><p></p><p># cat one.log</p><p>One</p><p></p><p># cat two.log</p><p>Two</p><p></p><p># cat three.log</p><p>Three</p><p></p><p># cat *.log >> final.log</p><p># ls -l</p><p>-rw-rw-r-- 1 <user> <group> 14 Mar 28 12:39 final.log</p><p>-rw-rw-r-- 1 <user> <group> 4 Mar 28 12:39 one.log</p><p>-rw-rw-r-- 1 <user> <group> 6 Mar 28 12:39 three.log</p><p>-rw-rw-r-- 1 <user> <group> 4 Mar 28 12:39 two.log</p><p></p><p># cat final.log</p><p>One</p><p>Three</p><p>Two</p><p>[/CODE]</p><p></p><p>The reason I got One, Three, Two as opposed to One, Two, Three is that "*.log" is resolved alphabetically, so Three is before Two..</p><p></p><p>So in your case, to keep the things in proper order (if it matters), you want the files to be named/numbered in a manner in which they will show up in the order you want..</p></blockquote><p></p>
[QUOTE="Raz0rEdge, post: 1506088, member: 110816"] Are the .LOG file just text or something else? Can you open them in TextEdit and have them show something legible? If so, you can use a simple Terminal command to combine them all with something like: [CODE] cat *.log >> final.log [/CODE] For example [CODE] # ls -l -rw-rw-r-- 1 <user> <group> 4 Mar 28 12:39 one.log -rw-rw-r-- 1 <user> <group> 6 Mar 28 12:39 three.log -rw-rw-r-- 1 <user> <group> 4 Mar 28 12:39 two.log # cat one.log One # cat two.log Two # cat three.log Three # cat *.log >> final.log # ls -l -rw-rw-r-- 1 <user> <group> 14 Mar 28 12:39 final.log -rw-rw-r-- 1 <user> <group> 4 Mar 28 12:39 one.log -rw-rw-r-- 1 <user> <group> 6 Mar 28 12:39 three.log -rw-rw-r-- 1 <user> <group> 4 Mar 28 12:39 two.log # cat final.log One Three Two [/CODE] The reason I got One, Three, Two as opposed to One, Two, Three is that "*.log" is resolved alphabetically, so Three is before Two.. So in your case, to keep the things in proper order (if it matters), you want the files to be named/numbered in a manner in which they will show up in the order you want.. [/QUOTE]
Verification
Name this item 🌈
Post reply
Forums
Apple Computing Products:
macOS - Operating System
help merging many gps .log files into 1 .log file
Top