Re: du --files-from feature request

2008-11-30 Thread Brian Dessent
Aaron Peterson wrote: > I spend many hours trying to figure this out / and searching for solution. > It turns out that the \0 delimited list requirement was very painful. > I wish I could cat the output of find into du and get the total It's meant to be used like: $ find . -type f -print0 | du

Re: Possible bug with grep/sed/tail?

2008-11-22 Thread Brian Dessent
Jim Meyering wrote: > local setvbuf='__attribute__ ((constructor)) void > f () { setvbuf (stdout, NULL, _IOLBF, 0); }' > echo "$setvbuf" | gcc -s -include stdio.h -x c - -fPIC -shared \ > -o "$line_buffer_so" Note that I named the function 'f()' for brevity in the

Re: Possible bug with grep/sed/tail?

2008-11-20 Thread Brian Dessent
Pádraig Brady wrote: > It's probably useful to add this functionality to all coreutil filters. > I still need to be convinced that glibc is not the correct place for this. > If it was there then any users of stdio could be controlled. It has been said before in previous threads but I want to re-s

Re: weird bug in tr (translate or delete character)

2008-09-22 Thread Brian Dessent
Arch Drone wrote: > [EMAIL PROTECTED]:~/tmp$ ls > a > [EMAIL PROTECTED]:~/tmp$ echo "abcDEF.<>" | tr -d [:alpha:] > bcDEF.<> > [EMAIL PROTECTED]:~/tmp$ mv a b; ls > b > [EMAIL PROTECTED]:~/tmp$ echo "abcDEF.<>" | tr -d [:alpha:] > .<> This is not a bug. Without quoting, [:alpha:] is interpreted

Re: cut - lack of --merge-delimiters option

2008-08-31 Thread Brian Dessent
Jan Skowron wrote: > coreutils program "cut" could use a "merge delimiters" option. > > Common use case: ls -l | cut ... > One needs to print 7-th column of ls -l to see all times of > modifications. But there is no constant number of delimiters between If you are only interested in times, why n

Re: md5sum results with V5.2.1 and V5.97 differ

2008-08-14 Thread Brian Dessent
Aparna Rallabandi wrote: > $ md5sum --string "654321" > c33367701511b4f6020ec61ded352059 "654321" This is the md5 of the six characters "654321". > $ echo "654321" |md5sum --text > 4a62cf6ee3f8d889e65af1cc271f20fa - This is the md5 of the seven characters "654321\n". Use echo -n if you don't

Re: Feature Request - prepend to file

2008-04-05 Thread Brian Dessent
Eric Blake wrote: > machines. Finally, what syntax did you have in mind? It is probably > possible to write a shell script that has that exact same syntax, but uses > existing commands, to achieve the task without needing to add a new coreutil. I agree that for light duty a few simple shell com

Re: date +%s ignores TZ

2008-02-29 Thread Brian Dessent
Jan Engelhardt wrote: > I wanted to get the number of seconds since the start of the day. > > echo $[`date +%s` % 86400]; How about: echo $[$(date +%s) - $(date -d '' +%s)] Brian ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://l

Re: Building portions of coreutils

2008-02-03 Thread Brian Dessent
NightStrike wrote: > Thanks :) I agree that mingw is a very hard platform to work with. > My intent is to just get enough programs working to be able to > configure and build the toolchain (binutils, gcc, and gdb). I don't see how you have any hope of doing that. The whole reason for the creati

Re: argve0, psfool

2007-12-24 Thread Brian Dessent
"Daniel C. Bastos" wrote: > I always miss these two programs on every system I meet. argv0 is very > handy when dealing with programs that care about argv[0] and psfool is > essential when giving out passwords through the command line. I figure > these two should be in coreutils. perl -e 'exec {

Re: Canceling interactive mode - cp

2007-12-23 Thread Brian Dessent
August Zajonc wrote: > I'm used to be able to do something like this > > alias cp=cp -i I think the common opinion around here is that -i aliases like that are evil and wrong. They encourage bad behavior like training your muscle memory to always reply "y" without thinking (thus defeating the w

Re: [cp v5.97] --noreply erroneously depreciated

2007-12-20 Thread Brian Dessent
Chris Velevitch wrote: > I thought rsync is meant for copying files between machines? In what There's no requirement that rsync can only be used between two different machines. > It did have it, > until it got depreciated. No, it didn't have such an option. Go read those old threads. --reply=

Re: Bug in cat

2007-10-23 Thread Brian Dessent
"Cutler, David" wrote: > When I downloaded Cygwin, I specified the use of DOS line terminators. > > I found a bug in what I suspect is cat when used with a simple bash shell > script. Since you're using Cygwin, the Cygwin mailing list is a better place to post this because most coreutils develo

Re: coreutils: Where is the repository of the manual pages?

2007-10-23 Thread Brian Dessent
Jari Aalto wrote: > Could you point me to the manual (info?) sources and document > which explains the build procedure for *.N files. The .x files are just skeletons. The meat of the man pages are generated automatically from the --help output of each binary with the help2man script. Brian __

Re: linecut development

2007-10-13 Thread Brian Dessent
Steven Schubiger wrote: > I'm currently struggling how to make pipe support work correctly, because > one needs to know beforehand how many lines of input are available (to > turn relative range line positions into their absolute counterparts), > which implies reading through the entire STDIN stre

Re: Bugreport for ChMod

2007-10-09 Thread Brian Dessent
Michael Gorbovitski wrote: > Maybe we could add several examples, to either the help or the man page? > > And no, neither the man page nor the info page is much better. What are you talking about? The info page has an entire section on this: $ info coreutils "Symbolic modes" -o - --subnodes 2>

Re: feature request: zero-terminated lines for comm

2007-09-10 Thread Brian Dessent
James Youngman wrote: > I beg your pardon. Of course I meant -I. > > $ printf "onetwo\nthree four\n" | xargs -I {} showargs {} > argv[0] = /home/youngman/bin/showargs > argv[1] = onetwo > argv[0] = /home/youngman/bin/showargs > argv[1] = three four I see. But, using -I forces one invoc

Re: feature request: zero-terminated lines for comm

2007-09-09 Thread Brian Dessent
James Youngman wrote: > While that is true, those utilities already coped with the space > character (for example, with "find -print" and "xargs -L"). xargs cannot cope with filenames containing spaces without -0/-print0. $ echo -e "one two\nthree four" | xargs showargs argv[0] = 'showargs' argv

Re: chmod problem

2007-09-05 Thread Brian Dessent
John Gatewood Ham wrote: > I was under the impression 0700 was the octal code and would thus > result in 0700 permissions, not leaving 2700 permissions. How > can I use the octcal code to get 0700 permissions for a directory > with 2700 permissions? I tried 00700 but that didn't matter. I know

Re: what will happen to the --reply option?

2007-08-25 Thread Brian Dessent
alessandro salvatori wrote: > On top of that the only way for me to get the desired behaviour of skipping > existing files seems to be: See the previous thread from earlier this month: Brian ___

Re: bug in /bin/test ?

2007-08-25 Thread Brian Dessent
Emanuele Tomasi wrote: > $> /usr/bin/test -n $casa && echo yes || echo no > yes > > $> /usr/bin/test $casa && echo yes || echo no > no > > $> /usr/bin/test -z $casa && echo yes || echo no > yes I think you may not be understanding the fact that the shell expands $casa into the empty string befor

Re: Command touch and irregular file names

2007-08-15 Thread Brian Dessent
- Tong - wrote: > In my script I have > > touch -r "$file1" "$file2" > > the file1/2 can be anything file, ../path/file, /root/file, etc. > > The problem is when file1/2 are irregular file names. E.g., -test.file1/2. > > I.e., anyway to make the following touch command works? > > $ touch -r

Re: Can't set the timezone for "date".

2007-07-23 Thread Brian Dessent
Alan Mackenzie wrote: > I think it would be helpful if the manual said something like this. Even > coreutils.info just says (in a fairly buried place) "Normally, `date' > operates in the time zone indicated by `TZ', or the system default if > `TZ' is not set", without giving any indication of exa

Re: aux.* as filename

2007-06-26 Thread Brian Dessent
Paul Eggert wrote: > Hmm, how is it that they are reserved for use by coreutils ports to > Windows, and yet Microsoft's POSIX tools can create files named "aux" > and the like? Is there something that the coreutils porters should > know? Microsoft says "programs control the policy for creating f

Re: Potential Bug Report

2007-06-22 Thread Brian Dessent
[EMAIL PROTECTED] wrote: >I would like to report what I think is a bug: why the following linux > "date" command fails to run within a shell script. But, in runs fine on > the command line. I'm running 2.6.21-1.3194.fc7 on a IBM Thinkpad. I've > also tested on an IBM eServer running 2.6.9-55.E

Re: comm separator document tab

2007-05-25 Thread Brian Dessent
Dan Jacobson wrote: > comm documents don't mention that columns are made via tabs, and it > one is not happy with that what one can do about that (nothing, even > if one's data has tabs in it and one wants to use a different separator.) What do you mean? It says it right there: With no optio

Re: sort by line length

2007-04-24 Thread Brian Dessent
Jim Meyering wrote: > You can do this in perl (or awk, ruby, etc) as a one-liner, > so it may not be worth adding to a C application: > > echo 1 938 four aa a | fmt -1 \ > | perl -ne 'push @line, $_;sub END{print sort {length $a<=>length $b} > @line}' > 1 > aa > 938 > four > a Not to

Re: chown - not like other Unixes.

2007-03-30 Thread Brian Dessent
Sam G wrote: > I was wondering why the gnu chown doesn't have an option to behave > like other unixes, where the 'owner' of a file can chown. FAQ: http://www.gnu.org/software/coreutils/faq/#Why-can-only-root-chown-files_003f ___ Bug-coreutils mailing

Re: dirname - bug or feature?

2007-02-23 Thread Brian Dessent
Fill Manuel wrote: There's no need to reinvent this wheel. > [EMAIL PROTECTED]:~> dirname ../testfile > .. > [EMAIL PROTECTED]:~> dirname-ng.pl ../testfile > /home > [EMAIL PROTECTED]:~> $ dirname `readlink -m ../testfile` /home > [EMAIL PROTECTED]:~> dirname ../../../././testfile > ../../.././

Re: cp should look for destination file operand BEFORE wildcardexpansion

2007-02-20 Thread Brian Dessent
Anshul Nigham wrote: > I don't think this could be intended or expected behavior in any > scenario. I suggest that the cp behavior be modified to look for a > destination file operand before expanding wildcards, in which case a > command like "cp [options] wildcard-expr" would still exit with an >

Re: basename sucks

2007-02-01 Thread Brian Dessent
dusan halicky wrote: > This is the exact case why to do it, look at \"my\" version: > > $ cat filename | basename Arg! Why why why do people do this nonsense? There is *NO* reason to use cat here. "basename http://lists.gnu.org/mailman/listinfo/bug-coreutils

Re: rm doesnt' delete

2007-01-12 Thread Brian Dessent
Lise Slama wrote: > I have some trouble with "rm". > > When I do > > rm --recursive --verbose a.out > > or more generally when I use "rm -R", it only deletes the corresponding > files in the current directory. > Do you know if there is some thing to configure or some way to correct that?

Re: rmdir problem in Molinux

2006-12-14 Thread Brian Dessent
"M. David Frost" wrote: > rmdir filename (error message - directory not empty) > > rmdir -rf filename (error message - invalid option -- r) > > When I type: > > dir filename > > the directory is empty. It may not be empty. ls doesn't show everything by default. Files that begin with ".

Re: sort does not use tab as delimiter

2006-12-09 Thread Brian Dessent
The Wanderer wrote: > Actually, I just tested - entered a tab in this mail, copied it with > Ctrl-C, attempted to paste it into an xterm with Ctrl-V. No result. You need to read the bash manpage. Search for "tab-insert" in the readline section. It has nothing to do with copy and paste, it is a

Re: [coreutils] "cut" from last column

2006-12-04 Thread Brian Dessent
Philip Ganchev wrote: > > > cut -f 3,5-+3 myfile > > > > How about: > > > > perl -F'\t' -nae 'print join "\t", @F[2,4..$#F-3]' myfile > > Even more verbose and complicated (clumsy). Your original cut example requires forking four external binaries and one shell builtin, and involves at least two

Re: [coreutils] "cut" from last column

2006-12-03 Thread Brian Dessent
Philip Ganchev wrote: > functionality very often when working with tabular data. Currently, > the expression to achieve this is clumsy: > > cut -f 3,5-$(echo $(head -1 myfile | wc -w) - 3 | bc) myfile You're right, that's very clumsy, especially the "head -1" part which is problematic. (You sh

Re: Replacing text?

2006-12-01 Thread Brian Dessent
Solarius wrote: > Is there any way to replace string with another, for example from > standard input to standard output via commandline with GNU toolbox? This is possible with sed, awk, perl, and probably a zillion other tools, depending on exactly what you want to do. But none of these are part

Re: Feature-Request: random sort

2006-11-15 Thread Brian Dessent
Matthias Schniedermeyer wrote: > As far as i can see it the opposite of sort is missing. > Randomize/shuffling the incoming data lines, so you can e.x. use it for > a playlist. > > find . -type f | sort --shuffle | xargs <...> You must not be using the current version. This was added in 6.1: `

Re: mv command fails on files >4GB

2006-10-31 Thread Brian Dessent
Paul Eggert wrote: > "Rich Morgan" <[EMAIL PROTECTED]> writes: > > > I'm trying to move large files from one filesystem to another and the mv > > command fails with the message "File size limit exceeded". The partial > > destination file is not removed and is 4,294,967,295 bytes in size. > > Mo

Re: "ls -h -l" returns 255GB, while "ls -l" returns 272 gigabytes

2006-10-25 Thread Brian Dessent
"Jameson C. Burt" wrote: > Upon rebooting, the resulting filesize listed with "ls" is inconsistent, >ls -h -l partition.img > -rw-r--r-- 1 root root 255G 2006-10-24 23:10 partition.img >ls -l partition.img > -rw-r--r-- 1 root root 272751509504 2006-10-24 23:10 partition.img T

Re: comm command bug while using with Tilda delimited files

2006-05-25 Thread Brian Dessent
Anand Ramamoorthy wrote: > This is the first time I'm having issues with "comm" command on an HP-UX Unix > box (Model: 9000/800, Release: B11.11) > > I'm trying to compare two files that are "~" delimited. > > File 1 > > 1~10 > 5~30 > 55~40 > 6~20 > > > File 2 > > 1~20 > 5~3

Re: `configure' and `make/bison' build issues

2006-05-11 Thread Brian Dessent
Eric Blake wrote: > Actually, it is very common to get conflicts in generated files, when the > version of the generator is different between the person who checked into > cvs vs. the person doing the build (for example autoconf 2.59 vs 2.59c). > That's why so many projects try to avoid generated

Re: `configure' and `make/bison' build issues

2006-05-10 Thread Brian Dessent
vy wrote: > roamantic:~/continuing/_study/coreutils/lib vy$ bison -y getdate.y > getdate.y:215: unrecognized: %parse_param > getdate.y:215:Skipping to next % > getdate.y:216: unrecognized: %lex_param > getdate.y:216:Skipping to next % This could mean the version of bison that you have ins

Re: patch: contrib/compare_tests

2006-05-02 Thread Brian Dessent
Andrew Pinski wrote: > > I was lazy today and decided to use compare_tests. Guess what, it doesn't > > work on recent coreutils/sort (i.e. the one on FC5). > > > > >From the texinfo doc: > > > > On older systems, `sort' supports an obsolete origin-zero syntax > > `+POS1 [-POS2]' for specif

Re: error in date command

2006-05-01 Thread Brian Dessent
Adam Miller wrote: >According to the man page, /bin/date +%x should report the > date in the following format: mm/dd/yy No it doesn't, it says it reports the date in the format appropriate to the current locale: %x locale's date representation (e.g., 12/31/99) Note that "e.g." me

Re: Possible bug w/sort: As of coreutils-5.9x, sort loses command-linecolumn offset (e.g. +1.0n)

2006-04-14 Thread Brian Dessent
"John P. Eisenmenger" wrote: > So is this a bug, or do I just need to learn the new way of specifying > column offsets? It's not a bug. See the NEWS file. Brian ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listin

Re: make error

2006-03-10 Thread Brian Dessent
Paul Eggert wrote: > > LINK.EXE /subsystem:console /DLL /nologo /base:"0x4ad0" /NOENTRY > > /IMPLIB:ic > > udt.lib /out:icudt34.dll stubdata.o > > LINK: extra operand `/nologo' > > Try `LINK --help' for more information. > > make[1]: *** [icudt34.dll] Error 1 > > make[1]: Leaving directory `/

Re: Filename pattern in grep --include=....

2006-02-02 Thread Brian Dessent
Com MN PG P E B Consultant 3 wrote: > >From the grep man-page: > >--include=PATTERN > Recurse in directories only searching file matching > PATTERN. > > What type of PATTERN can be used here (i.e. glob, regex, extended regex, > etc.)? grep is not a part of coreutils, so yo

Re: dircolors aliases

2006-01-18 Thread Brian Dessent
Nathan Fearnley wrote: > I've looked through the documentation, I've looked through configuration > files, I've even taken a glance through the source, I can't figure out where > dircolors decides to define the aliases. Any clue? Is it hard coded in the > source, or is it part of a configuration f

Re: Localization based problem with sort

2006-01-17 Thread Brian Dessent
Dirk Stoecker wrote: > So please tell me a way to use the sort program in contexts which allow no > environment variable settings. I will be happy to accept it. You can use "env LC_COLLATE=C sort -opts" as the sort command. Or 'sh -c "LC_COLLATE=C sort -opts"'. Brian _

Re: something iteresting

2005-12-29 Thread Brian Dessent
Bob Proulx wrote: > You probably wanted the [EMAIL PROTECTED] mailing list for asking > for gcc help. That sound probably be gcc-help (at) gcc.gnu.org Brian ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bu

Re: Bug#340236: coreutils: cp -p to nfs destination failsto preserve timestamps

2005-12-22 Thread Brian Dessent
The Wanderer wrote: > The strace output does not refer to utimes by name. The relevant EPERM > is returned by something referred to as SYS_271 - presumably the label > simply means "strace could not identify the name of this syscall" - and > all five of the arguments are given only as hex values.

Re: Sort bug

2005-12-21 Thread Brian Dessent
"linux-os (Dick Johnson)" wrote: > Clearly it's not sorted. > Since "_" (0x5f) is lower in value than 'a' (0x61), clearly > the sorted list should have all the names beginning with > the underscore first! Only if you're using the C locale. Read the FAQ. http://www.gnu.org/software/coreutils/faq

Re: (no subject)

2005-12-20 Thread Brian Dessent
"Lakkimsetti, Chalapathi G" wrote: >I want to work on mysql in linux. i have gentoo linux in my system. After > i loaded mysql5.0.17, if i want to install the mysql it is giving error "NO > file/directory found" eventhough it is having that file. I don't think anyone on this list has any id

Re: Apparently irrational behaviour in sort

2005-12-05 Thread Brian Dessent
The Wanderer wrote: > Instead, I'll just ask how > exactly I'm supposed to make sure that one and *only* one copy of any > messages I receive from the list gets sorted into the folder in which I > keep list messages... while simultaneously making sure that any messages > which happen to have been

Re: Apparently irrational behaviour in sort

2005-12-05 Thread Brian Dessent
The Wanderer wrote: > I had considered that, but did not have a clear idea of what to add or > where to add it... and, now that I've both thought about that further > and looked more closely, the copy of the source I have (from Debian's > 5.93 source package) does not appear to contain the file fr

Re: logwatch bug - script zz-disk_space

2005-11-23 Thread Brian Dessent
[EMAIL PROTECTED] wrote: > OS: RHEL 4 Update 1 > File: /etc/log.d/scripts/services/zz-disk_space > change line 20: "df -h | grep '^/dev/'" > to: "df -h" You need to report this to your OS vendor, in this case Red Hat. This mailing list has nothing to do with that script or any ot

Re: ls -L should say just what file doesn't exist

2005-11-23 Thread Brian Dessent
Dan Jacobson wrote: > lrwxrwxrwx 1 2 2005-11-18 07:08 xx -> yy > grep: xx: No such file or directory > > User thinks: the problem is really Grep isn't part of coreutils, so this is off-topic for this list. You may want to make your case on the grep mailing list:

Re: Feature request: ignore non-existant files with diff -r

2005-11-16 Thread Brian Dessent
"Bryce Nesbitt (mailing list account)" wrote: > This is a request for a command line switch to "diff -r", The diff command is not a part of coreutils: http://www.gnu.org/software/diffutils/diffutils.html ___ Bug-coreutils mailing list Bug-coreutils@gn

Re: Incorrect lexographical sort in sort (coreutils)5.2.1

2005-10-27 Thread Brian Dessent
Murray Stokely wrote: > The current version of GNU sort on my Linux box incorrectly > sorts the following simple file, while an older version of GNU > sort on MacOS X 10.4 works fine. > > $ sort --version > sort (coreutils) 5.2.1 Version 5.2.1 is more than 18 months old (released 2004-03-12) and

Re: Suggestion for new coreutil: "every" prints every M out of N lines

2005-10-14 Thread Brian Dessent
Wayne Hayes wrote: > SYNOPSIS: > every [-M[,N]] [OPTIONS] [list-of-files] > > DESCRIPTION > Print N lines out of every M lines in a file. If no files are > listed, use the standard input. N and M both default to 1, so that > every(1) without options acts like cat(1). Every(1) c

Re: chown - Operation not permitted

2005-09-01 Thread Brian Dessent
Bob Proulx wrote: > Please see this frequently given answer in the reference below. > > http://www.gnu.org/software/coreutils/faq/ > > Look for "Why can only root chown files?" Incidently, there is an incomplete sentence in that section of the FAQ ("Such as creating..."). BrianIndex: coreuti

Re: (Query): Changing the Functionality of rm Command

2005-08-17 Thread Brian Dessent
"Chawla, Sumit" wrote: > I need to change the functionality of one of the existing binaries of > Linux. For example that of command 'rm'. Please guide how to proceed in that > case. I need to perform some pre-deletion and post –deletion task . For that > I need to either design a hookup function

Re: test binary

2005-07-21 Thread Brian Dessent
Kenneth J Vojtech wrote: > In zLinux for o/s390 (SuSe v 8 64 bit) is a binary 'test' that we use to > test for the existence of files. One of our tests uses a wildcard to check You are probably using the bash builtin command 'test' here and not the binary /bin/test that is a part of coreutils.

Re: coreutils version number policy

2005-07-17 Thread Brian Dessent
Heiner Steven wrote: > I have two different systems (Debina and SuSE), both with ^^^ I think that's they key right there. Distros like Debian tend to add lots of local patches to make things run more smoothly for them. In the case of Debian:

Re: "line" utility

2005-07-11 Thread Brian Dessent
Michael Tewner wrote: > Is there a reason that there isn't a tool that prints one or more lines > from within a file? > > For years, everyone has been doing this with ` head | tail ` > > ...or is there a program that does this already? seq 1 50 | sed -n 3,25p sed 1 50 | sed -n 11,+10p # gnu s

Re: base64 tool?

2005-06-28 Thread Brian Dessent
Simon Josefsson wrote: > > As for whether choosing on "base64 abc" whether abc is the filename > > containing text to be encoded, or the actual text to be encoded, I would > > lean towards filenames. > > Me too. The tool started out as a debugging tool for me, but it is > not the typical use. A

Re: Maybe a bug

2005-06-21 Thread Brian Dessent
nosair wrote: > scp -r [EMAIL PROTECTED]:~/* ~/ECEJUNE2006 | tee transfer_june_2006.txt > > I get the prompt for password. After that, the downloading of files and > folders begins as normal. However, the file transfer information does not show > on screen, and transfer_june_2006.txt remains empt

Re: DD converts LF -> CR / LF

2005-05-06 Thread Brian Dessent
Eric Blake wrote: > Predefining O_BINARY as the default input_flags and output_flags is a > stopgap measure. While it is fine for other programs, such as od, to Doesn't that overly complicate things? Seems to me that whenever you use dd you are interested in copying fixed record length data. I