Re: How to count the last line when it does not end with a newline character?

2021-09-07 Thread Sami Kerola
Above definitions are from the web page below. https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html -- Sami Kerola http://www.iki.fi/kerolasa/

Re: Wishing rmdir had a prompt

2019-09-02 Thread Sami Kerola
t I don't see any problem adding --interactive long only option. Getting a short option may clash with future posix requirement, so I believe they are not handed out without really good reasons. -- Sami Kerola http://www.iki.fi/kerolasa/

Re: How to calculate date relative to another date?

2019-05-21 Thread Sami Kerola
#x27;t think the direct calculation of this kind of relative date is > possible with coreutiles' date command. Some kind of external > arithmetic calculation must be used. Is it so? Seems to work fine when date specification is not quite as ambiguous as "2018/05". $ date -

Re: [PATCH] id: add feature to accept multiple usernames

2018-07-16 Thread Sami Kerola
ol what to print and how. lslogins --logins=$USER,nobody --output=USER,GROUP,SUPP-GROUPS -- Sami Kerola http://www.iki.fi/kerolasa/

Re: rm feature: don't attempt to remove the same file twice

2016-09-01 Thread Sami Kerola
emove 'a': No such file or directory", but it is also a > performance improvement. > Pretty marginal I admit, except perhaps for a network filesystem hosted by a > server on the other side of the planet. This looks valid to me rm a a there could be other process, such as touch a a running parallel. -- Sami Kerola http://www.iki.fi/kerolasa/

Re: [PATCH] Speedup wc -l

2015-03-15 Thread Sami Kerola
have that yet in debian >> unfortunately. >> >> What cpu do you have? > > > i3-2310M > > I was doing a very quick test with _short_ lines > Specifically /usr/share/dict/words > > Note GCC should be using builtin_memchr here so not > hitting the function call overhead. > > I'll look in more detail later. Build from coreutils & gnulib git checkouts from point v8.23-149-gd95cdcc real0m0.824s real0m0.828s real0m0.830s real0m0.831s real0m0.875s After Kristoffer's change real0m0.774s real0m0.776s real0m0.778s real0m0.779s real0m0.780s I'm using up to date testing archlinux. $ pacman -Q gcc glibc linux gcc 4.9.2-4 glibc 2.21-2 linux 3.19.1-1 Built with: gcc -O3 -Ofast CPU: AMD E1-1200 Reference. My test input had following data: $ time wc test-input 1141570 8211600 49489140 test-input -- Sami Kerola http://www.iki.fi/kerolasa/

Re: cloning to multiple drives with the "dd" command.

2015-02-20 Thread Sami Kerola
; > I would be _very_ interested to know if this same behavior occurs if you > have your source file in a ramdisk. Is there a reason why $ dd if=/dev/zero count=1 of=/tmp/a of=/tmp/b could not be made to write to two, or any number of of= destinations, in single execution? -- Sami Kerola http://www.iki.fi/kerolasa/

Re: [PATCH] rename: move command from util-linux to coreutils

2014-05-05 Thread Sami Kerola
On 24 December 2013 22:29, Sami Kerola wrote: > This is a resubmission[1][2] of the rename(1), with attempt to move it > from util-linux package to coreutils. Various compiler warnings are > removed, make syntax-check passes, --test option is renamed to --dry-run, > file list can

Re: [PATCH] maint: make ChangeLog generation more robust

2014-05-04 Thread Sami Kerola
e patch Jim sent looked good so I pushed it to GNU Hello upstream. Thanks. -- Sami Kerola http://www.iki.fi/kerolasa/

Re: [PATCH] rename: move command from util-linux to coreutils

2013-12-24 Thread Sami Kerola
/archive/html/coreutils/2012-07/threads.html#00014 On 24 December 2013 22:28, Sami Kerola wrote: > The implementation is completely rewrote without chaning existing > command line syntax. This implementation adds --exec option, which > will allow use of a string manipulation command, such a

[PATCH] rename: move command from util-linux to coreutils

2013-12-24 Thread Sami Kerola
lpath: Pádraig Brady +rename: Sami Kerola rm: Paul Rubin, David MacKenzie, Richard M. Stallman, Jim Meyering rmdir: David MacKenzie runcon: Russell Coker diff --git a/NEWS b/NEWS index cbac480..212b697 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,11 @@ GNU coreutils NEWS

Re: RFE: Modification to the Timezone Modifier

2013-12-10 Thread Sami Kerola
mple but the goal was to be able to adjust the fi_FI locale so that > it would produce correct time strings. I've added this clarification to > the above request as well. Hi Marko, I wonder would it be easier to ask Finnish localization recommendation group to reconsider the format, with emphasis they should choose something that is already supported. -- Sami Kerola http://www.iki.fi/kerolasa/

Re: Formatting Columnar/Delimited Data?

2013-09-16 Thread Sami Kerola
e in space-padded, fixed-width format. A command from util-linux package might suitable for purpose you are after. column -s, -t example.csv -- Sami Kerola http://www.iki.fi/kerolasa/

Re: factor and large prime numbers

2013-07-22 Thread Sami Kerola
On 22 July 2013 16:01, Sami Kerola wrote: > I were curious how quickly factor will process prime numbers, and > found something rather strange. For example these five can be computed > quite quickly. > > time factor 10333147966386144929513375231999

factor and large prime numbers

2013-07-22 Thread Sami Kerola
29523279903960414084761860964351999 Any idea what is going on? -- Sami Kerola http://www.iki.fi/kerolasa/

Re: [PATCH] ls: do not print directory indicator for root

2013-05-13 Thread Sami Kerola
ple. > >> Again color and context should avoid any ambiguity? > > I would say * consistency *, color and context. With emphasis on > consistency. Hi Bob and Pádraig, The --color consistency seems to be so good argument against approving the patch that I cannot defend it. IMHO it the change belongs to rejected area with reference to this thread. -- Sami Kerola http://www.iki.fi/kerolasa/

[PATCH] ls: do not print directory indicator for root

2013-05-12 Thread Sami Kerola
Previously 'ls -Fd /' printed unnecessary directory indicator. The root is represented by '/' character, which does not need to be repeated. * src/ls.c: (print_long_format, print_file_name_and_frills): Check if a output name is root, and skip indicator when necessary. * src/ls.c: A new function

ls: directory indication, again

2013-05-12 Thread Sami Kerola
t might be appriciated, so I included one. Hopefully this time around the change can be pushed either to upstream or wall of rejection. -- Sami Kerola http://www.iki.fi/kerolasa/

Re: Adding "progress bar" feature to "cp" and "mv" commands

2013-05-12 Thread Sami Kerola
ould be done with the proposal. Would it make sense to add 'rejected feature requests' section to http://www.pixelbeat.org/patches/coreutils/inbox_apr_2013.html and have a link to latest summary in README.hacking? IMHO the rejected section should contain only features which has already

Re: ls and root directory indicator

2013-02-25 Thread Sami Kerola
On Mon, Feb 25, 2013 at 1:27 PM, Eric Blake wrote: > On 02/24/2013 11:09 AM, Pádraig Brady wrote: >> On 02/24/2013 05:39 PM, Sami Kerola wrote: >>> Hello, >>> >>> When using file type indicator to a root, e.g., >>> >>> $ ls -Fd / >>

ls and root directory indicator

2013-02-24 Thread Sami Kerola
, although I could not find earlier posting about that. >From 639409e3355676cb786a403eea60c1ef4bbaf61d Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sun, 24 Feb 2013 17:17:20 + Subject: [PATCH] ls: do not print directory indicator for root Organization: Lastminute.com Previously 

Re: [PATCH] Support for --size in du

2013-01-20 Thread Sami Kerola
ry as a utility to do that job. Another drawback with --max-size is that when I am interested what is filling disk I need to guess a limit. If I get it wrong the listing is either very long or nothing, and rerun is required. The guess iteration loop can be avoided if --top is present. -- Sami Kerola http://www.iki.fi/kerolasa/

Re: rename: move command from util-linux to coreutils

2012-07-19 Thread Sami Kerola
On Tue, Jul 17, 2012 at 10:07 PM, Jim Meyering wrote: > Erik Auerswald wrote: >> On 07/17/2012 05:10 PM, Sami Kerola wrote: >>> On Mon, Jul 9, 2012 at 3:27 PM, Jim Meyering wrote: >>> [...] >>>> A few things should be changed regardless. >>>> F

Re: rename: move command from util-linux to coreutils

2012-07-17 Thread Sami Kerola
//github.com/kerolasa/coreutils.git rename -- Sami Kerola http://www.iki.fi/kerolasa/

Re: rename: move command from util-linux to coreutils

2012-06-10 Thread Sami Kerola
t 'indent -gnu rename.c' fixing everything. I will fix this at same go with unchecked syscalls. > I also saw a TAB or two used in indentation.  Use only spaces. > If you run "make syntax-check", it will show you where. Same for this. > Providing more test covera

[PATCH] maint: additional su removal

2012-06-09 Thread Sami Kerola
* tests/misc/help-version: Remove expected su exit code. --- tests/misc/help-version |1 - 1 file changed, 1 deletion(-) diff --git a/tests/misc/help-version b/tests/misc/help-version index e19f5b1..4563625 100755 --- a/tests/misc/help-version +++ b/tests/misc/help-version @@ -30,7 +30,6 @@

rename: move command from util-linux to coreutils

2012-06-09 Thread Sami Kerola
06-09 21:57:03 +0200) ---- Sami Kerola (1): rename: move command from util-linux to coreutils AUTHORS |1 + NEWS |2 + README |8 +- doc/coreutils.texi | 117

Re: PATCH: relpath

2011-12-02 Thread Sami Kerola
gt; +1 from me. > > Jim's point about 'path' ambiguity is valid. > I guess using 'getpathname' would address that. > Also 'realpath' is a bit less ambiguous than 'getpath' > in this regard I think. How about maximizing the ambiguousnes

Re: rename command

2011-07-02 Thread Sami Kerola
On Sat, Jul 2, 2011 at 17:56, Sami Kerola wrote: [snip] > o Add upper & lower casing options, which needs to obey locale. [snip] > o Add --sed to do complicated name manipulations (only an idea). > Assuming this is desired should I simply copy all necessary code from > sed to be

Re: rename command

2011-07-02 Thread Sami Kerola
what is being done --help display this help and exit --version output version information and exit -- snip p.s. I will away keyboard for next week so finalization of the command needs to wait a bit. Good side is that a pause of a week will give plenty of time to disc

Re: rename command

2011-06-28 Thread Sami Kerola
On Tue, Jun 28, 2011 at 11:48, Erik Auerswald wrote: > On Tue, Jun 28, 2011 at 09:57:02AM +0100, Pádraig Brady wrote: >> On 28/06/11 08:21, Erik Auerswald wrote: >> > On Mon, Jun 27, 2011 at 05:26:48PM +0100, Pádraig Brady wrote: >> >> On 27/06/11 10:11, Sami Kero

Re: rename command

2011-06-27 Thread Sami Kerola
2011/6/27 Pádraig Brady : > On 27/06/11 10:11, Sami Kerola wrote: >> Hello coreutilitarians, >> >> I have been lately making some util-linux patches and while doing >> so I found rename command. It did not take long to realize that >> the command would be much b

rename command

2011-06-27 Thread Sami Kerola
mpt to fix that was unsuccessful. The command itself poses few implementation questions. Should rename support recursion, and should the rename move files across directories (IMHO that would be unintuitive)? --    Sami Kerola    http://www.iki.fi/kerolasa/ From 0822b6d3eb167639747b73d6618bf23a8a99cb

[coreutils] [PATCH] uniq: don't continue field processing after end of line

2011-01-16 Thread Sami Kerola
g rational, so I look the code and tested how it works. That inspired me to send bug fix, which is obvious thing to do. But how about that -t, do you think this would be worth while addition to uniq? --    Sami Kerola    http://www.iki.fi/kerolasa/ From 4652493c90940e5460ccfeb8ed3e231e06ee46dc Mon

[coreutils] [PATCH] call getenv SIMPLE_BACKUP_SUFFIX only when backups are defined

2010-11-13 Thread Sami Kerola
Hi, The patch will remove FIXME item from cp, install, ln and mv. I do acknowledge that getenv ("SIMPLE_BACKUP_SUFFIX") does still get to be called unnecessarily if numbered backups are asked, which is not perfect, but better than calling it always. --    Sami Kerola    http://

[coreutils] [PATCH] unexpand: support --in-place option

2010-11-07 Thread Sami Kerola
| 24 src/unexpand.c | 107 + 11 files changed, 498 insertions(+), 88 deletions(-) --    Sami Kerola    http://www.iki.fi/kerolasa/ From d2efb1fb0ebf49b06df59f35a2589ced96d4468c Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sun, 7 Nov 2010 20:24:03 +0100 Subject: [PATC

Re: [coreutils] [PATCH] Cater for extra strace output when building 32-on-64.

2010-10-30 Thread Sami Kerola
ess PID=[0-9]* runs in 32 bit mode./d' < out > out-destrace --    Sami Kerola    http://www.iki.fi/kerolasa/