Re: LF (was Re: CR/LF)

2022-12-11 Thread Jim Popovitch
On Sun, 2022-12-11 at 22:29 +, debian-u...@howorth.org.uk wrote: > > > The important bit of my email was actually the bit you've omitted :) Apologies, I believe it's proper netiquette to trim email posts to the most relevant of parts. It makes it much better for the archive. Here is what t

Re: LF (was Re: CR/LF)

2022-12-11 Thread debian-user
> On Sun, 2022-12-11 at 21:22 +, debian-u...@howorth.org.uk wrote: > > > > You're misunderstanding what Greg's saying, again. He's not saying > > you were given working solutions three times, he's saying you were > > told at least three times that echo without -n will always produce > > a newl

Re: LF (was Re: CR/LF)

2022-12-11 Thread Jim Popovitch
On Sun, 2022-12-11 at 21:22 +, debian-u...@howorth.org.uk wrote: > > > You're misunderstanding what Greg's saying, again. He's not saying you > were given working solutions three times, he's saying you were told at > least three times that echo without -n will always produce a newline. I bel

Re: LF (was Re: CR/LF)

2022-12-11 Thread debian-user
> On Sun, 2022-12-11 at 12:48 -0500, Greg Wooledge wrote: > > On Sun, Dec 11, 2022 at 11:48:23AM -0500, Jim Popovitch wrote: > > > On Sun, 2022-12-11 at 08:54 -0500, Greg Wooledge wrote: > > > > On Sun, Dec 11, 2022 at 08:16:35AM +0100, to...@tuxteam.de > > > > wrote: > > > > > That said. Gre

Re: CR/LF

2022-12-11 Thread tomas
On Sun, Dec 11, 2022 at 02:03:59PM -0500, Jim Popovitch wrote: > > > On Sun, 2022-12-11 at 18:53 +0100, to...@tuxteam.de wrote: > > On Sun, Dec 11, 2022 at 11:48:36AM -0500, Jim Popovitch wrote: > > > Ahh, sorry for using a descriptive acronym that I have used for decades > > > to define an end-

Re: CR/LF

2022-12-11 Thread Jim Popovitch
On Sun, 2022-12-11 at 11:46 -0700, Charles Curley wrote: > On Sun, 11 Dec 2022 11:48:36 -0500 > Jim Popovitch wrote: > > > Ahh, sorry for using a descriptive acronym that I have used for > > decades to define an end-of-line. Whether it's in-fact a CR/LF, or > > just a LF, doesn't really change th

Re: CR/LF

2022-12-11 Thread Jim Popovitch
On Sun, 2022-12-11 at 18:53 +0100, to...@tuxteam.de wrote: > On Sun, Dec 11, 2022 at 11:48:36AM -0500, Jim Popovitch wrote: > > [...] > > > Ahh, sorry for using a descriptive acronym that I have used for decades > > to define an end-of-line. Whether it's in-fact a CR/LF, or just a LF, > > does

Re: LF (was Re: CR/LF)

2022-12-11 Thread Jim Popovitch
On Sun, 2022-12-11 at 12:48 -0500, Greg Wooledge wrote: > On Sun, Dec 11, 2022 at 11:48:23AM -0500, Jim Popovitch wrote: > > On Sun, 2022-12-11 at 08:54 -0500, Greg Wooledge wrote: > > > On Sun, Dec 11, 2022 at 08:16:35AM +0100, to...@tuxteam.de wrote: > > > > That said. Greg, I was also shaken by

Re: CR/LF

2022-12-11 Thread Charles Curley
On Sun, 11 Dec 2022 11:48:36 -0500 Jim Popovitch wrote: > Ahh, sorry for using a descriptive acronym that I have used for > decades to define an end-of-line. Whether it's in-fact a CR/LF, or > just a LF, doesn't really change the original question about the > addition of a end- of-line being inse

Re: CR/LF

2022-12-11 Thread tomas
On Sun, Dec 11, 2022 at 12:53:50PM -0500, Greg Wooledge wrote: [...] > When echo is operating in SysV mode, the \c escape sequence suppresses > the generation of a newline. Woah. I didn't know about that one. Did I say I learn from your postings every time? Thanks -- t signature.asc Descript

Re: CR/LF

2022-12-11 Thread Greg Wooledge
On Sun, Dec 11, 2022 at 06:46:05PM +0100, to...@tuxteam.de wrote: > On Sun, Dec 11, 2022 at 08:54:27AM -0500, Greg Wooledge wrote: > > 3) echo usually, but not always, adds an additional newline character to > >the output. In most cases, this is acceptable, even preferable. But > >when th

Re: CR/LF

2022-12-11 Thread tomas
On Sun, Dec 11, 2022 at 11:48:36AM -0500, Jim Popovitch wrote: [...] > Ahh, sorry for using a descriptive acronym that I have used for decades > to define an end-of-line. Whether it's in-fact a CR/LF, or just a LF, > doesn't really change the original question [...] No, but it confuses the hell

Re: LF (was Re: CR/LF)

2022-12-11 Thread Greg Wooledge
On Sun, Dec 11, 2022 at 11:48:23AM -0500, Jim Popovitch wrote: > On Sun, 2022-12-11 at 08:54 -0500, Greg Wooledge wrote: > > On Sun, Dec 11, 2022 at 08:16:35AM +0100, to...@tuxteam.de wrote: > > > That said. Greg, I was also shaken by your roaring tone. > > > > Yeah, well, he was told the same thi

Re: CR/LF

2022-12-11 Thread tomas
On Sun, Dec 11, 2022 at 08:54:27AM -0500, Greg Wooledge wrote: > On Sun, Dec 11, 2022 at 08:16:35AM +0100, to...@tuxteam.de wrote: > > That said. Greg, I was also shaken by your roaring tone. > > Yeah, well, he was told the same thing, repeatedly, by multiple people, > and somehow he managed to ig

Re: CR/LF

2022-12-11 Thread Kamil Jońca
Jim Popovitch writes: > Ahh, sorry for using a descriptive acronym that I have used for decades > to define an end-of-line. Whether it's in-fact a CR/LF, or just a LF, > doesn't really change the original question about the addition of a end- For me - changes. I was confused why linux machine ca

Re: CR/LF

2022-12-11 Thread Jim Popovitch
On Sun, 2022-12-11 at 07:04 -0700, Charles Curley wrote: > On Sat, 10 Dec 2022 23:16:12 -0500 > Jim Popovitch wrote: > > > > There is still no CR. At all. Ever. This is not Microsoft > > > Windows. > > > > Why would you assume Windows is involved? This is about running cmds > > from Deb

Re: LF (was Re: CR/LF)

2022-12-11 Thread Jim Popovitch
On Sun, 2022-12-11 at 08:54 -0500, Greg Wooledge wrote: > On Sun, Dec 11, 2022 at 08:16:35AM +0100, to...@tuxteam.de wrote: > > That said. Greg, I was also shaken by your roaring tone. > > Yeah, well, he was told the same thing, repeatedly, by multiple people, > and somehow he managed to ignore ev

Re: CR/LF

2022-12-11 Thread Greg Wooledge
On Sun, Dec 11, 2022 at 07:04:37AM -0700, Charles Curley wrote: > > Because you originally asked about a CR/LF (carriage return, and line > feed) sequence. That is a Windows end-of-line indicator. Linux indicates > end of line with LF only. Macs, I believe, use CR only. Mac OS 9 and earlier used

Re: CR/LF

2022-12-11 Thread Charles Curley
On Sat, 10 Dec 2022 23:16:12 -0500 Jim Popovitch wrote: > > There is still no CR. At all. Ever. This is not Microsoft > > Windows. > > Why would you assume Windows is involved? This is about running cmds > from Debian 11 to Debian 11. Because you originally asked about a CR/LF (carriage r

Re: CR/LF

2022-12-11 Thread Greg Wooledge
On Sun, Dec 11, 2022 at 08:16:35AM +0100, to...@tuxteam.de wrote: > That said. Greg, I was also shaken by your roaring tone. Yeah, well, he was told the same thing, repeatedly, by multiple people, and somehow he managed to ignore every single instance of it. It's rather frustrating. As a formal

Re: CR/LF

2022-12-10 Thread tomas
On Sun, Dec 11, 2022 at 12:02:59AM -0500, Jim Popovitch wrote: [...] > welp. > > Hope you have a good day tomorrow, To be fair, Greg takes those things seriously. And is extremely helpful, see his writeups [1]. Recommended reading. And he has the sharpest eyes around here in things shell. I t

Re: CR/LF

2022-12-10 Thread David Wright
On Sat 10 Dec 2022 at 23:16:12 (-0500), Jim Popovitch wrote: > The following > will add a CR/LF: > > TEST=`ssh -o LogLevel=QUIET -t user@server "echo -n ''"`; echo ${TEST} > > Using -n on the 2nd echo would remove a necessary CR/LF on any remote > cmd that did produce output. I didn't give m

Re: CR/LF

2022-12-10 Thread Jim Popovitch
On Sat, 2022-12-10 at 23:44 -0500, Greg Wooledge wrote: > On Sat, Dec 10, 2022 at 11:16:12PM -0500, Jim Popovitch wrote: > > On Sat, 2022-12-10 at 22:10 -0500, Greg Wooledge wrote: > > > On Sat, Dec 10, 2022 at 10:07:48PM -0500, Jim Popovitch wrote: > > > > > > > Why does this produce a CR/LF > >

Re: CR/LF

2022-12-10 Thread Greg Wooledge
On Sat, Dec 10, 2022 at 11:16:12PM -0500, Jim Popovitch wrote: > On Sat, 2022-12-10 at 22:10 -0500, Greg Wooledge wrote: > > On Sat, Dec 10, 2022 at 10:07:48PM -0500, Jim Popovitch wrote: > > > > > Why does this produce a CR/LF > > There is still no CR. At all. Ever. This is not Microsoft Wind

Re: CR/LF

2022-12-10 Thread Jim Popovitch
On Sat, 2022-12-10 at 22:10 -0500, Greg Wooledge wrote: > On Sat, Dec 10, 2022 at 10:07:48PM -0500, Jim Popovitch wrote: > > On Sat, 2022-12-10 at 20:35 -0600, David Wright wrote: > > > On Sat 10 Dec 2022 at 21:01:29 (-0500), Jim Popovitch wrote: > > > > Why does this produce a CR/LF > > > > >

Re: CR/LF

2022-12-10 Thread Charles Curley
On Sat, 10 Dec 2022 21:01:29 -0500 Jim Popovitch wrote: > Why does this produce a CR/LF > > ~$ TEST=$(ssh -o LogLevel=QUIET -t user@server "echo -n ''"); echo > ${TEST} > > whilst this same command does not: > > ~$ ssh -o LogLevel=QUIET -t user@server "echo -n ''" Because the second echo i

Re: CR/LF

2022-12-10 Thread Greg Wooledge
On Sat, Dec 10, 2022 at 10:07:48PM -0500, Jim Popovitch wrote: > On Sat, 2022-12-10 at 20:35 -0600, David Wright wrote: > > On Sat 10 Dec 2022 at 21:01:29 (-0500), Jim Popovitch wrote: > > > Why does this produce a CR/LF > > > > > >  ~$ TEST=$(ssh -o LogLevel=QUIET -t user@server "echo -n ''"); ec

Re: CR/LF

2022-12-10 Thread Jim Popovitch
On Sat, 2022-12-10 at 20:35 -0600, David Wright wrote: > On Sat 10 Dec 2022 at 21:01:29 (-0500), Jim Popovitch wrote: > > Why does this produce a CR/LF > > > >  ~$ TEST=$(ssh -o LogLevel=QUIET -t user@server "echo -n ''"); echo ${TEST} > > Try echo -n ${TEST} at the end. Thanks, that works if th

Re: CR/LF

2022-12-10 Thread Greg Wooledge
On Sat, Dec 10, 2022 at 08:35:59PM -0600, David Wright wrote: > On Sat 10 Dec 2022 at 21:01:29 (-0500), Jim Popovitch wrote: > > Why does this produce a CR/LF > > > > ~$ TEST=$(ssh -o LogLevel=QUIET -t user@server "echo -n ''"); echo ${TEST} > > Try echo -n ${TEST} at the end. You mean printf %

Re: CR/LF

2022-12-10 Thread Greg Wooledge
On Sat, Dec 10, 2022 at 09:01:29PM -0500, Jim Popovitch wrote: > Why does this produce a CR/LF > > ~$ TEST=$(ssh -o LogLevel=QUIET -t user@server "echo -n ''"); echo ${TEST} It does not produce a carriage return, unless you're on Windows. The second echo command (the local one) produces a newli

Re: CR/LF

2022-12-10 Thread David Wright
On Sat 10 Dec 2022 at 21:01:29 (-0500), Jim Popovitch wrote: > Why does this produce a CR/LF > > ~$ TEST=$(ssh -o LogLevel=QUIET -t user@server "echo -n ''"); echo ${TEST} Try echo -n ${TEST} at the end. > whilst this same command does not: > > ~$ ssh -o LogLevel=QUIET -t user@server "echo -

Re: CR/LF even better

2001-11-10 Thread Alan Shutko
[EMAIL PROTECTED] writes: > #include > #include Are you posting homework assignments here, or are you unaware of the much simpler ways to do this? -- Alan Shutko <[EMAIL PROTECTED]> - In a variety of flavors! If this fortune didn't exist, somebody would have invented it.

Re: CR/LF

2001-11-10 Thread Vineet Kumar
* [EMAIL PROTECTED] ([EMAIL PROTECTED]) [011109 18:13]: why switch? how about: > #include > > int main() > { > char ch; > > while(!cin.eof() ){ > cin.get(ch); if(ch != '\r') { cout << ch; } > } > > return 0; > } (see also /usr/bin/tr for