|
From: | jhx |
Subject: | [PATCH] fold: Add '-c' (cut) option to cut off lines at a specific WIDTH |
Date: | Sat, 11 Feb 2023 15:45:55 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 |
Hello everyone,I personally often use 'fold' to break up some long lines, which works well. Lately I have been in the need to cut of a line at a specific length - removing the rest of the line. I made a small patch for 'fold' to do just that. The line gets cut off at WIDTH (specified via -w WIDTH) and three dots will be printed for a more appealing output. The new option added is '-c' for 'cut'. I checked out the newest code via Git and compiled 'fold' with the patch attached to this mail. (No errors/warnings were output).
Attached you will find the patch for 'fold'.Apologies if there is something missing/wrong - Never contributed to any GNU software before. :)
Greetings Julian "jhx"
fold-cut-line.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |