Re: realpath quoting

2024-05-04 Thread Greg Wooledge
On Sat, May 04, 2024 at 08:22:27AM -0500, Tom Browder wrote: > $ cat read.raku > #!/usr/bin/env raku > my $a = "name with spaces"; > my $b = "name\nwith newline"; > say "file 1: |$a|"; > say "file 2: |$b|"; > > And executing it: > > $ ./read.raku > file 1: |name with spaces| > file 2: |name > wit

Re: realpath quoting

2024-05-04 Thread Tom Browder
ith spaces| file 2: |name with newlines| With Raku, it's easy to search the directory for the weird file names, open them, and use their contents. Raku also has many built-in quoting constructs to suit any situation. I'll be happy to demo any of that here. Best regards, -Tom

Re: realpath quoting

2024-05-04 Thread DdB
Am 03.05.2024 um 21:11 schrieb David Christensen: > I can obviously add an extra step to the process to convert the new file > name to something acceptable before processing. However, my question was > how to avoid that extra step by getting fully quoted filenames to process. Today, on linux, i am

Re: realpath quoting

2024-05-04 Thread DdB
Am 03.05.2024 um 21:11 schrieb David Christensen: > I can obviously add an extra step to the process to convert the new file > name to something acceptable before processing. However, my question was > how to avoid that extra step by getting fully quoted filenames to process. Not sure, if i get it

Re: realpath quoting

2024-05-03 Thread David Christensen
On 5/3/24 04:34, jeremy ardley wrote: On 3/5/24 19:06, Greg Wooledge wrote: I would suggest that if you need to use a debugger to track down a bug in your program, you should use filenames that don't require quoting when you set up your tests. 1970's style static test cases are no

Re: realpath quoting

2024-05-03 Thread David Christensen
characters is going to baffle me. Currently, $' quoting is a bash extension. It's supposed to appear in some future edition of POSIX, at which point shells like dash will be required to adopt it (whenever they get around to it). For now, though, you should consider it bash only. T

Re: realpath quoting

2024-05-03 Thread Max Nikulin
On 03/05/2024 11:31, jeremy ardley wrote: My use case is very simple. Give an argument to a program that expects a single filename/path. Role of realpath in your workflow is not clear for me yet. If you need to copy its result to clipboard then you may use xsel, xclip, etc. realpath --zero

Re: realpath quoting

2024-05-03 Thread Sirius
In days of yore (Fri, 03 May 2024), jeremy ardley thus quoth: > > On 3/5/24 19:06, Greg Wooledge wrote: > > I would suggest that if you need to use a debugger to track down a bug > > in your program, you should use filenames that don't require quoting > > when you s

Re: realpath quoting

2024-05-03 Thread jeremy ardley
On 3/5/24 19:06, Greg Wooledge wrote: I would suggest that if you need to use a debugger to track down a bug in your program, you should use filenames that don't require quoting when you set up your tests. 1970's style static test cases are not relevant here. In the real w

Re: realpath quoting

2024-05-03 Thread Greg Wooledge
On Thu, May 02, 2024 at 10:18:03PM -0700, David Christensen wrote: > I am unable to find $'string' in the dash(1) man page (?). As I typically > write "#!/bin/sh" shell scripts, writing such to deal with file names > containing non-printing characters is going to baff

Re: realpath quoting

2024-05-03 Thread Greg Wooledge
r the debugger, should do about this case. I would suggest that if you need to use a debugger to track down a bug in your program, you should use filenames that don't require quoting when you set up your tests.

Re: realpath quoting

2024-05-02 Thread David Christensen
On 5/2/24 19:56, Max Nikulin wrote: On 03/05/2024 09:19, Greg Wooledge wrote: I still insist that this is a workaround that should *not*  be used to try to cancel out quoting bugs in one's shell scripts. There are still specific cases when quoting is necessary, e.g. ssh remote command

Re: realpath quoting

2024-05-02 Thread David Christensen
nnewline" You didn't create a name with a newline in it here. You created a name with a backslash in it. If you wanted a newline, you would have to use the $'...' quoting form (in bash). touch $'name with\nnewline' Thank you for th

Re: realpath quoting

2024-05-02 Thread Teemu Likonen
* 2024-05-03 06:59:37+0800, jeremy ardley wrote: > I have a need  to get the full path of a file that has spaces in its > name to use as a program argument > jeremy@client:~$ realpath name\ with\ spaces > /home/jeremy/name with spaces > Can realpath or other utility return a quoted pathname? T

Re: realpath quoting

2024-05-02 Thread jeremy ardley
On 3/5/24 10:56, Max Nikulin wrote: On 03/05/2024 09:19, Greg Wooledge wrote: I still insist that this is a workaround that should *not*  be used to try to cancel out quoting bugs in one's shell scripts. There are still specific cases when quoting is necessary, e.g. ssh remote co

Re: realpath quoting

2024-05-02 Thread Max Nikulin
On 03/05/2024 09:19, Greg Wooledge wrote: I still insist that this is a workaround that should *not* be used to try to cancel out quoting bugs in one's shell scripts. There are still specific cases when quoting is necessary, e.g. ssh remote command (however you have to be sure conce

Re: realpath quoting

2024-05-02 Thread Greg Wooledge
ne" You didn't create a name with a newline in it here. You created a name with a backslash in it. If you wanted a newline, you would have to use the $'...' quoting form (in bash). touch $'name with\nnewline' > 2024-05-02 19:06:01 dpchrist@laalaa ~ > $ per

Re: realpath quoting

2024-05-02 Thread David Christensen
On 5/2/24 15:59, jeremy ardley wrote: I have a need  to get the full path of a file that has spaces in its name to use as a program argument e.g. jeremy@client:~$ ls -l name\ with\ spaces -rw-r--r-- 1 jeremy jeremy 0 May  3 06:51 'name with spaces' jeremy@client:~$ realpath name\ with\ spaces

Re: realpath quoting

2024-05-02 Thread Greg Wooledge
On Fri, May 03, 2024 at 07:42:20AM +0800, jeremy ardley wrote: > > On 3/5/24 07:29, Greg Wooledge wrote: > > > The spaces without quotes cause problems with subsequent processing. > > Then the subsequent processing has bugs in it. Fix them. > > > > > Can realpath or other utility return a quoted

Re: realpath quoting

2024-05-02 Thread jeremy ardley
On 3/5/24 07:29, Greg Wooledge wrote: The spaces without quotes cause problems with subsequent processing. Then the subsequent processing has bugs in it. Fix them. Can realpath or other utility return a quoted pathname? That would be extremely counterproductive. Do not look for kludges to

Re: realpath quoting

2024-05-02 Thread Greg Wooledge
On Fri, May 03, 2024 at 06:59:37AM +0800, jeremy ardley wrote: > I have a need  to get the full path of a file that has spaces in its name to > use as a program argument > > e.g. > > jeremy@client:~$ ls -l name\ with\ spaces > -rw-r--r-- 1 jeremy jeremy 0 May  3 06:51 'name with spaces' > jeremy@

Re: realpath quoting

2024-05-02 Thread DdB
> $ touch '/mnt/tmp/gibt es nicht' > $ realpath -mz "../ln/tmpRAM/gibt es nicht" | xargs -0 ls > --quoting-style=escape > /mnt/tmp/gibt\ es\ nicht ?

realpath quoting

2024-05-02 Thread jeremy ardley
I have a need  to get the full path of a file that has spaces in its name to use as a program argument e.g. jeremy@client:~$ ls -l name\ with\ spaces -rw-r--r-- 1 jeremy jeremy 0 May  3 06:51 'name with spaces' jeremy@client:~$ realpath name\ with\ spaces /home/jeremy/name with spaces The spa

Re: Displaying an arbitrary file in _both_ HEX and ASCII (Quoting error)

2020-01-22 Thread Greg Wooledge
On Wed, Jan 22, 2020 at 04:49:38PM +0100, Linux-Fan wrote: > > My favorite hex editor is `dhex` (Debian package `dhex`). > > > From to the list of requirements, it does 4 of 6. > > Excuse me, this is mis-quoted, it should of course have been this > (i.e. both lines attributed to me): > > > My fav

Re: Displaying an arbitrary file in _both_ HEX and ASCII (Quoting error)

2020-01-22 Thread Linux-Fan
Linux-Fan writes: Bob Weber writes: On 1/22/20 8:12 AM, Richard Owlett wrote: I'm running Debian 9.8 with MATE desktop. I'm exploring a data file with the intention of eventually parsing it in a useful fashion. Just downloaded ghex. I like the display format. Its tools are inconvenient. Sugge

Re: Snipping and quoting: Re: Wifi not working in Lenovo laptop/Ideapad/Atheros QCA9377

2019-05-31 Thread tv.deb...@googlemail.com
On 31/05/2019 23:22, rhkra...@gmail.com wrote: On Friday, May 31, 2019 01:32:20 PM tv.deb...@googlemail.com wrote: Hi, most people on this list prefer bottom-posting rather than top-posting, so I'll stick with the convention and post my answer at the bottom of the message, suggesting you do the

Snipping and quoting: Re: Wifi not working in Lenovo laptop/Ideapad/Atheros QCA9377

2019-05-31 Thread rhkramer
On Friday, May 31, 2019 01:32:20 PM tv.deb...@googlemail.com wrote: > Hi, most people on this list prefer bottom-posting rather than > top-posting, so I'll stick with the convention and post my answer at the > bottom of the message, suggesting you do the same in the future to avoid > potential nast

Emails with improper quoting (was: Re: (solved) Re: need help on wheezy installation)

2018-01-03 Thread rhkramer
(or replied to) using a web based emailer, presumably on Mozilla/5.0. I don't know if that is the case, nor if there is some setting that can be changed (by the replier) to make quoting come out "properly". Re: (solved) Re: need help on wheezy installation From: David Christensen

Re: How to change date and time format for quoting in Thunderbird?

2017-08-26 Thread Mike Kupfer
Mario Castelán Castro wrote: > When replying to a message in Thunderbird as packaged in Debian 9, the > date and time is automatically placed before the quote, like this: “On > 22/08/17 17:31, $NAME wrote:”. How can I change the format used for the > date and time? http://kb.mozillazine.org/Date_

Re: How to change date and time format for quoting in Thunderbird?

2017-08-26 Thread Mario Castelán Castro
On 25/08/17 15:41, Byung-Hee HWANG (황병희, 黃炳熙) wrote: > "lambda.alex.chromebook" is my chromebook's system-name. The others is > https://raw.githubusercontent.com/soyeomul/Gnus/MaGnus/thanks-mid.rb.message-id I do not understand. -- Do not eat animals, respect them as you respect people. https://

Re: How to change date and time format for quoting in Thunderbird?

2017-08-25 Thread Byung-Hee HWANG (황병희, 黃炳熙)
Dear Mario, In Article <71bb9099-1dac-7567-3aeb-4c1c0ecd8...@yandex.com>, Mario Castelán Castro writes: > I see you are using the “Message-id” field. This is not at all useful > for humans. "lambda.alex.chromebook" is my chromebook's system-name. The others is https://raw.githubusercontent.com

Re: How to change date and time format for quoting in Thunderbird?

2017-08-25 Thread Mario Castelán Castro
On 25/08/17 07:36, Byung-Hee HWANG (황병희, 黃炳熙) wrote: > In Article <3af44f03-ebc9-473c-2d77-36961f66d...@yandex.com>, >> When replying to a message in Thunderbird as packaged in Debian 9, the >> date and time is automatically placed before the quote, like this: “On >> 22/08/17 17:31, $NAME wrote:”.

Re: How to change date and time format for quoting in Thunderbird?

2017-08-25 Thread Byung-Hee HWANG (황병희, 黃炳熙)
In Article <3af44f03-ebc9-473c-2d77-36961f66d...@yandex.com>, Mario Castelán Castro writes: > When replying to a message in Thunderbird as packaged in Debian 9, the > date and time is automatically placed before the quote, like this: “On > 22/08/17 17:31, $NAME wrote:”. How can I change the form

How to change date and time format for quoting in Thunderbird?

2017-08-24 Thread Mario Castelán Castro
When replying to a message in Thunderbird as packaged in Debian 9, the date and time is automatically placed before the quote, like this: “On 22/08/17 17:31, $NAME wrote:”. How can I change the format used for the date and time? In addition, I want to change the format of $NAME to include his e-mai

Re: curiosity: quoting in /etc/default

2013-10-09 Thread Tom H
On Wed, Oct 9, 2013 at 5:51 PM, Ross Boylan wrote: > > I was a little surprised to find that I needed to quote my variable > definitions in /etc/default, at least for nfs-kernel-server. > RPCMOUNTDOPTS="--manage-gids --no-nfs-version 4" > works, but > RPCMOUNTDOPTS=--manage-gids --no-nfs-version 4

Re: curiosity: quoting in /etc/default

2013-10-09 Thread Karl E. Jorgensen
Hi On Wed, Oct 09, 2013 at 02:51:17PM -0700, Ross Boylan wrote: > I was a little surprised to find that I needed to quote my variable > definitions in /etc/default, at least for nfs-kernel-server. > RPCMOUNTDOPTS="--manage-gids --no-nfs-version 4" > works, but > RPCMOUNTDOPTS=--manage-gids --no-nf

curiosity: quoting in /etc/default

2013-10-09 Thread Ross Boylan
I was a little surprised to find that I needed to quote my variable definitions in /etc/default, at least for nfs-kernel-server. RPCMOUNTDOPTS="--manage-gids --no-nfs-version 4" works, but RPCMOUNTDOPTS=--manage-gids --no-nfs-version 4 produces # /etc/init.d/nfs-kernel-server restart /etc/default/n

Re: Re: Quoting Style

2013-08-17 Thread Brian Potkin
In posting of the month John Hasler very perceptively said: Then why do you send it? There is no answer to that. But being -user . . . . -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: ht

Re: Quoting Style

2013-08-17 Thread Lisi Reisz
blue there isn't any connection to the color applied by > the reader's mail-user-agent which could be green or red or other > color.  So I think the writer here was talking about html colors. My client only uses the colours I have chosen for correctly quoted text. For random other

Re: Quoting Style

2013-08-17 Thread Lisi Reisz
On Saturday 17 August 2013 15:47:37 Kim Christensen wrote: > > No! It's easier to read mails, when bottom or inline posting is > > used > > I suggest another name for this -- "contextual quoting"! I have always before heard it called interleaved posting. Li

Re: Quoting Style

2013-08-17 Thread Kim Christensen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2013-08-16 16:03, Ralf Mardorf wrote: > No! It's easier to read mails, when bottom or inline posting is > used I suggest another name for this -- "contextual quoting"! That is, the art of only quoting what is needed for

Re: Quoting Style

2013-08-17 Thread Pascal Hambourg
point was the OP was claiming > how the colors showed up on his system, Yes. On HIS system. And I proposed an explanation of why these colors showed up. > and he expected the same colors to appear on other people's systems. I did not read that. Any reference please ? > And unlike yo

Re: Quoting Style

2013-08-17 Thread John Hasler
Pascal Hambourg writes: > I do not care how it appears on YOUR system. Then why do you send it? -- John Hasler jhas...@newsguy.com Elmwood, WI USA -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Ar

Re: Quoting Style

2013-08-17 Thread Jerry Stuckle
those colors are picked by the reader, not the writer. The coloring also applies to the quoted text in the reply window, even though it is plain text. This also makes replying using conversational/interleaved quoting easier IMO. The important point here, as Bob pointed out, is that the coloring

Re: Quoting Style

2013-08-17 Thread Pascal Hambourg
er. >>> But those colors are picked by the reader, not the writer. >> The coloring also applies to the quoted text in the reply window, even >> though it is plain text. This also makes replying using >> conversational/interleaved quoting easier IMO. > > The import

Re: Quoting Style

2013-08-17 Thread Jerry Stuckle
also applies to the quoted text in the reply window, even though it is plain text. This also makes replying using conversational/interleaved quoting easier IMO. The important point here, as Bob pointed out, is that the coloring appears on YOUR system. It does not appear on MY system (or most of

Re: Quoting Style

2013-08-17 Thread Pascal Hambourg
he quoted text in the reply window, even though it is plain text. This also makes replying using conversational/interleaved quoting easier IMO. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org A

Re: Using Thunderbird to reply to a mailing list Was Re: Quoting Style

2013-08-16 Thread Chris Bannister
On Fri, Aug 16, 2013 at 05:35:40PM +0100, Lisi Reisz wrote: > I need to apologise to the list. I was trying to alter my usual method of > replying to the list to one that still worked properly, I thought. Clearly > it didn't and I have broken the thread. So I shall resend the original of > th

Re: Quoting Style

2013-08-16 Thread Ralf Mardorf
On Fri, 2013-08-16 at 17:22 -0600, Bob Proulx wrote: > Pascal Hambourg wrote: > > Bob Proulx a écrit : > > > Blue? You mean as in html email? Colors will be lost entirely when > > > reading the mail as plain text. > > > > Some mail/news readers such as Thunderbird can apply different color and >

Re: Quoting Style

2013-08-16 Thread Bob Proulx
Pascal Hambourg wrote: > Bob Proulx a écrit : > > Blue? You mean as in html email? Colors will be lost entirely when > > reading the mail as plain text. > > Some mail/news readers such as Thunderbird can apply different color and > format to quoted text. This makes reading much easier. But thos

Re: Using Thunderbird to reply to a mailing list (Was Re: Quoting Style)

2013-08-16 Thread David Guntner
Lisi Reisz grabbed a keyboard and wrote: > Hopefully this will now not break the threading. I looked at your original reply and I'm not sure how it broke anything; I saw the usual References: line with valid information in the message header, and I understand that's how threaded message readers bu

Using Thunderbird to reply to a mailing list Was Re: Quoting Style

2013-08-16 Thread Lisi Reisz
Hopefully this will now not break the threading. On Friday 16 August 2013 17:10:33 David Guntner wrote: > Regardless of those preferences, on a mailing list where you don't know > what mail program someone reading is going to be using, it's always a > bad idea to use HTML in posting a message. Su

Re: Using Thunderbird to reply to a mailing list Was Re: Quoting Style

2013-08-16 Thread Lisi Reisz
I need to apologise to the list. I was trying to alter my usual method of replying to the list to one that still worked properly, I thought. Clearly it didn't and I have broken the thread. So I shall resend the original of this by my usual method. :-(( Lisi On Friday 16 August 2013 17:29:5

Using Thunderbird to reply to a mailing list Was Re: Quoting Style

2013-08-16 Thread Lisi Reisz
On Friday 16 August 2013 17:10:33 David Guntner wrote: > Regardless of those preferences, on a mailing list where you don't know > what mail program someone reading is going to be using, it's always a > bad idea to use HTML in posting a message.  Sure, at this point the > majority of mail readers c

Re: Quoting Style

2013-08-16 Thread David Guntner
forgive me for tagging onto your reply in order to reply to him. > On Wed, Aug 14, 2013 at 12:35:07PM -0400, Ethan Rosenberg, PhD wrote: >> Dear List - >> >> I appreciate your CONSTRUCTIVE criticism. I surely do not wish to >> have my posts unanswered. >> >> Int

Re: Quoting Style

2013-08-16 Thread Ralf Mardorf
On Fri, 2013-08-16 at 14:07 +0200, Pascal Hambourg wrote: > Top posting sucks. > Bottom posting sucks even more : it's the same as top posting, except > that you must scroll down to read the reply. > Some mail/news readers such as Thunderbird can apply different color and > format to quoted text.

Re: Quoting Style

2013-08-16 Thread Pascal Hambourg
Hello, Bob Proulx a écrit : > Ethan Rosenberg, PhD wrote: >> Industrial standard I think is, top quoting and styled email. > > Not on technical mailing lists! The standard is conversational > quoting. Thanks, I missed such an expression to describe proper quoting. Top pos

Re: Quoting Style

2013-08-16 Thread Chris Bannister
Subject adjusted to be more meaningfull. On Wed, Aug 14, 2013 at 12:35:07PM -0400, Ethan Rosenberg, PhD wrote: > Dear List - > > I appreciate your CONSTRUCTIVE criticism. I surely do not wish to > have my posts unanswered. > > Introduction - > > Industrial standard I t

Re: Quoting Style Re: Installing mysqldump

2013-08-15 Thread Bob Proulx
Ethan Rosenberg, PhD wrote: > Industrial standard I think is, top quoting and styled email. Not on technical mailing lists! The standard is conversational quoting. Here are some guides that I just now found after a quick search. http://www.netmeister.org/news/learn2quote.html h

Re: Quoting Style Re: Installing mysqldump

2013-08-15 Thread Eduardo M KALINOWSKI
On Qui, 15 Ago 2013, Lisi Reisz wrote: Just set your email client up correctly. You don't need to do anything else, except trim appropriately. In the case of Icedove/Thunderbird, you don't even need to set anything[0]. By default it does correct quoting, you just have to press

Re: Quoting Style Re: Installing mysqldump

2013-08-15 Thread Lisi Reisz
posts unanswered. > > Introduction - > > Industrial standard I think is, top quoting and styled email. This is > the way my Thunderbird is set. Mail list requirements are the reverse > as I well know. Therefore, I have to adjust Thunderbird to these > requirements. > > T

Re: Quoting Style Re: Installing mysqldump

2013-08-14 Thread Klaus
ribution. As described before, Icedove is easy to configure to do this. One other feature in Icedove I find useful when dealing with this sort of thing is to have multiple identities. In Account Settings, find the button Manage Identities. Each identity can have for instance differe

Re: Quoting Style Re: Installing mysqldump

2013-08-14 Thread Ralf Mardorf
Hi Ethan :) now I reply to my own mail and fake that I'm you. Btw. I'm sorry the ">" signs of my example were written by hand and not done by the MUA reply option and so it seems not to work as expected. Your last mail shouldn't look like http://lists.debian.org/debian-user/2013/08/msg00503.html

Re: Quoting Style Re: Installing mysqldump

2013-08-14 Thread Ethan Rosenberg, PhD
Oops, sorry, too many cats and mice. Jerry wrote: Tom wrote: > Itchy wrote: >> Scratchy wrote: >>> I'm hungry. [snip] >> I'm too. > Let's cook Tux under the grill. No, let's eat tofu. Regards, Jerry CORRECTIONS: First SCRATCHY wrote that he's hungry, then Itchy replied to be hungry too, wh

Re: Quoting Style Re: Installing mysqldump

2013-08-14 Thread Ralf Mardorf
Oops, sorry, too many cats and mice. Jerry wrote: > Tom wrote: > > Itchy wrote: > >> Scratchy wrote: > >>> I'm hungry. [snip] > >> I'm too. > > Let's cook Tux under the grill. > > No, let's eat tofu. > > Regards, > Jerry CORRECTIONS: > First SCRATCHY wrote that he's hungry, then Itchy replied

Re: Quoting Style Re: Installing mysqldump

2013-08-14 Thread Ralf Mardorf
Tom wrote: > Itchy wrote: >> Scratchy wrote: >>> I'm hungry. [snip] >> I'm too. > Let's cook Tux under the grill. No, let's eat tofu. Regards, Jerry Explaination: First Tom wrote that he's hungry, then Itchy replied to be hungry too, while doing this Itchy snipped irrelevant content, since Tom

Re: Quoting Style Re: Installing mysqldump

2013-08-14 Thread Ralf Mardorf
Jerry wrote: > No, let's eat tofu. Hi Jerry, does it mean that we should eat veggie, or is it some kind of figure of speech for being against tofu posting style? Ciao, Ralf PS: You might notice that the ">"-sign is used no "#---" or anything else, that it can be read from to

Quoting Style Re: Installing mysqldump

2013-08-14 Thread Ethan Rosenberg, PhD
Dear List - I appreciate your CONSTRUCTIVE criticism. I surely do not wish to have my posts unanswered. Introduction - Industrial standard I think is, top quoting and styled email. This is the way my Thunderbird is set. Mail list requirements are the reverse as I well know. Therefore, I

Re: bash quoting problems

2011-08-10 Thread Andreas Berglund
On 2011-08-10 07:46, Ivan Shmakov wrote: Andreas Berglund writes: > I have a problem with the following sed snippet > sed -i s"|^\( *PATH="\)\(.*\)|\1$ADD:\2|" ~/profile-test > I need soft quotes in order for $ADD to expand and I also need to > math against one doublequote in the

Re: bash quoting problems

2011-08-10 Thread Andreas Berglund
doublequote in the regexp in for $ADD to be put in the corrct place. Does anyone know how to do this? You may want to consider putting the sed script in a file and using the -f script (or --file=script) option instead. Thanks I'll keep that in mind if I have another quoting problem :D

Re: bash quoting problems

2011-08-10 Thread Andreas Berglund
inite amount of data. Thanks for the tip, I just assumed sed does greedy matching. sed -i "s|^\( *PATH=\"\)|\1$ADD:|" ~/profile-test Sometimes quoting can be complicated. In which case it is often useful to drop out of double quotes and move to single quotes. sed -i "

Re: bash quoting problems

2011-08-10 Thread Ivan Shmakov
against one doublequote in the regexp in for $ADD to be put in the >>> corrct place. Does anyone know how to do this? >> You may want to consider putting the sed script in a file and using >> the -f script (or --file=script) option instead. >> No quoting needed. ;)

Re: bash quoting problems

2011-08-10 Thread thomas . kral
ct place. Does anyone know how to do this? > > You may want to consider putting the sed script in a file and using the -f script (or --file=script) option instead. No quoting needed. ;) -- Bob McGowan BTW, since Squeeze default shell is dash, not bash -- Tomas Kral -- To

Re: bash quoting problems

2011-08-09 Thread Ivan Shmakov
> Andreas Berglund writes: > I have a problem with the following sed snippet > sed -i s"|^\( *PATH="\)\(.*\)|\1$ADD:\2|" ~/profile-test > I need soft quotes in order for $ADD to expand and I also need to > math against one doublequote in the regexp in for $ADD to be put in > the corrct

Re: bash quoting problems

2011-08-09 Thread Bob McGowan
o be put in the corrct place. Does anyone know how to do this? You may want to consider putting the sed script in a file and using the -f script (or --file=script) option instead. No quoting needed. ;) -- Bob McGowan -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org wi

Re: bash quoting problems

2011-08-08 Thread Bob Proulx
#x27;t needed. It is much more efficient to avoid matching a potentially infinite amount of data. sed -i "s|^\( *PATH=\"\)|\1$ADD:|" ~/profile-test Sometimes quoting can be complicated. In which case it is often useful to drop out of double quotes and move to single quotes. sed -

bash quoting problems

2011-08-08 Thread Andreas Berglund
Hi! I have a problem with the following sed snippet sed -i s"|^\( *PATH="\)\(.*\)|\1$ADD:\2|" ~/profile-test I need soft quotes in order for $ADD to expand and I also need to math against one doublequote in the regexp in for $ADD to be put in the corrct place. Does anyone know how to do this?

Re: OT: quoting variable names in shell scripts

2011-07-07 Thread John Hasler
Kamaraju writes: > I am wondering if there is a way to rewrite the names variable in > stanza2 such that the output from stanza 1 and stanza 2 are the same. I can think of several, but I doubt any will do what you want. What is your actual problem? What are you trying to achieve? -- John Hasler

Re: OT: quoting variable names in shell scripts

2011-07-07 Thread Javier Barroso
On Thu, Jul 7, 2011 at 10:31 AM, Teemu Likonen wrote: > * 2011-07-07T07:13:24+02:00 * Javier Barroso wrote: > >> On Thu, Jul 7, 2011 at 5:22 AM, Kamaraju S Kusumanchi >> wrote: >>> Consider the following shell script > >>> #! /bin/sh > >> You can use array variables if you want: >> >> names=("kam

Re: OT: quoting variable names in shell scripts

2011-07-07 Thread Teemu Likonen
* 2011-07-07T07:13:24+02:00 * Javier Barroso wrote: > On Thu, Jul 7, 2011 at 5:22 AM, Kamaraju S Kusumanchi > wrote: >> Consider the following shell script >> #! /bin/sh > You can use array variables if you want: > > names=("kama" "raju" "k a m a") > for i in "${names[@]}" Yes, but not with /b

Re: OT: quoting variable names in shell scripts

2011-07-06 Thread Javier Barroso
On Thu, Jul 7, 2011 at 5:22 AM, Kamaraju S Kusumanchi wrote: > Consider the following shell script > > $cat manual_listing.sh > #! /bin/sh > > # stanza 1 > for i in "kama" "raju" "k a m a" "r a j u" > do >        echo $i > done > > # stanza 2 > names='kama raju' > for i in $names > do >        ech

Re: OT: quoting variable names in shell scripts

2011-07-06 Thread William Hopkins
On 07/06/11 at 11:22pm, Kamaraju S Kusumanchi wrote: > Consider the following shell script > > $cat manual_listing.sh > >

OT: quoting variable names in shell scripts

2011-07-06 Thread Kamaraju S Kusumanchi
Consider the following shell script $cat manual_listing.sh #! /bin/sh # stanza 1 for i in "kama" "raju" "k a m

Re: [Solved again] Program for quoting text like in email?

2009-06-11 Thread Boyd Stephen Smith Jr.
In <20090611072553.gd3...@think.homelan>, Andrei Popescu wrote: >On Thu,11.Jun.09, 08:52:16, jida...@jidanni.org wrote: >> >>>>> "TA" == Thomas Anderson writes: >> >> TA> Sure: >> TA> Example of the "> " characters be

Re: [Solved again] Program for quoting text like in email?

2009-06-11 Thread Andrei Popescu
On Thu,11.Jun.09, 08:52:16, jida...@jidanni.org wrote: > >>>>> "TA" == Thomas Anderson writes: > > TA> Sure: > TA> Example of the "> " characters being moved around ... > > Observe instead the masterful quoting of SuperCite, (no

Re: Program for quoting text like in email?

2009-06-10 Thread Todd A. Jacobs
On Mon, Jun 08, 2009 at 03:55:54PM +0200, Thomas Anderson wrote: > Can anyone recommend a program/shell script/editor plugin etc, that > can take arbitrary text as input and quote it like email programs > quote emails with a preceding "> " character? Given a file named SomeTextFile, you can do yo

Re: [Solved again] Program for quoting text like in email?

2009-06-10 Thread jidanni
>>>>> "TA" == Thomas Anderson writes: TA> Sure: TA> Example of the "> " characters being moved around ... Observe instead the masterful quoting of SuperCite, (no longer broken in emacs23) that I have graced your words with above. Leave-not your w

Re: sed/awk/fmt question hijacked from Re: Program for quoting text like in email?

2009-06-10 Thread Johannes Wiedersich
Cameron Hutchison wrote: > You can combine these into a single sed invocation: > > set -i -e "/.gconf/d" -e "/.java/d" script s/set/sed/ ;-) Johannes -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.or

[Solved again] Program for quoting text like in email?

2009-06-10 Thread Thomas Anderson
t; " for text that is quoted twice. > > What do you mean by "moved around"? Can you post an example? Sure: Example of the "> " characters being moved around after quoting three times: > > > Lorem Ipsum is simply dummy text of the printing and typesetti

Re: sed/awk/fmt question hijacked from Re: Program for quoting text like in email?

2009-06-09 Thread Brian Wells
On Tue, 2009-06-09 at 20:09 -0700, Brian Wells wrote: [...] > You could have done > > sed -e "/.gconf/d" script | sed -e "/.java/d" >script > Oops. I forgot that this will try to read and write script at the same time. Won't work. But you can still link together many commands, so long as you

Re: sed/awk/fmt question hijacked from Re: Program for quoting text like in email?

2009-06-09 Thread Brian Wells
On Mon, 2009-06-08 at 22:14 -0400, Tony Baldwin wrote: > Spiro Harvey wrote: > >> Can anyone recommend a program/shell script/editor plugin etc, that > >> can take arbitrary text as input and quote it like email programs > >> quote emails with a preceding "> " character? > > > > > > awk '{print

Re: Program for quoting text like in email?

2009-06-09 Thread Cameron Hutchison
), then I guess you'd see the "moving around" you might be talking about. If this is the problem, you may want to use par(1) instead (from the "par" package). par knows about quoting and preserves it properly when reformatting. It's got quite a few options, but I typica

Re: Program for quoting text like in email?

2009-06-09 Thread Celejar
On Wed, 10 Jun 2009 00:38:40 +0200 Thomas Anderson wrote: ... > limitation due to my initial question. Hmm.. Any ideas? I'll try to > install the old "pine" email client and see if I could use it by > cut-n-pasting the text, choose reply, and then cut-n-paste it back > again. Not a very elegant

Re: Program for quoting text like in email?

2009-06-09 Thread Spiro Harvey
On Wed, 10 Jun 2009 00:38:40 +0200 Thomas Anderson wrote: > However I noticed another problem. When I quote a text that is already > quoted, the result gets the "> " characters moved around. I would like > to get ">> " or "> > " for text that is quoted twice. Is that easy to > fix or would that c

Re: Program for quoting text like in email?

2009-06-09 Thread Mike Castle
On Mon, Jun 8, 2009 at 8:02 AM, Kumar Appaiah wrote: > How about passing the text through fmt -w 80|sed 's/^/> //'? Or use the -p option to fmt -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Re: Program for quoting text like in email?

2009-06-09 Thread Thomas Anderson
>>> How about passing the text through fmt -w 80|sed 's/^/> //'? >>> (Untested). That should do what you desire, as fmt would format the >>> paragraphs, and sed would substitute every beginning of line with a "> >>> ". >> >> I got this output: >> >> to...@todu:~/code$ cat test.txt | fmt -w 80|sed '

Re: Program for quoting text like in email?

2009-06-09 Thread Eric Gerlach
On Tue, Jun 09, 2009 at 11:03:39AM +1200, Richard Hector wrote: > Then I'd use the editors features to format it. I can't remember how to > do the line wrapping stuff in vim, but gq{motion} So, gqap to format the current paragraph. Cheers, -- Eric Gerlach, Network Administrator Federation of S

Re: sed/awk/fmt question hijacked from Re: Program for quoting text like in email?

2009-06-09 Thread Boyd Stephen Smith Jr.
In <4a2dc587.60...@gmail.com>, Tony Baldwin wrote: >Why is it that with sed, stuff like >sed -e /searchterm/d >I have to do >sed -e /searchterm/d infile > outfile, >and can't just do sed -e /searchterm/d file, without having to generate >another file? Traditional sed is very simple. It doesn't "k

Re: sed/awk/fmt question hijacked from Re: Program for quoting text like in email?

2009-06-09 Thread Eduardo M KALINOWSKI
On Seg, 08 Jun 2009, Tony Baldwin wrote: I've been learning to use sed and awk and grep, etc., lately. I have a general question (probably more appropriate elsewhere, but I'm going to ask here anyway. Smack me later.). Bad, very bad. Why is it that with sed, stuff like sed -e /searchterm/d

Re: Program for quoting text like in email?

2009-06-09 Thread Girish Kulkarni
On Mon, 8 Jun 2009, Thomas Anderson wrote: Can anyone recommend a program/shell script/editor plugin etc, that can take arbitrary text as input and quote it like email programs quote emails with a preceding "> " character? GNU Emacs does this. In the Emacs 22.2.1 I run on Lenny, I put the '>'

  1   2   3   >