Simon said on Thu, 13 Jan 2022 18:38:56 +
>Steve Litt wrote:
>
>> This is one reason why, in shellscripts, you
>> need to quote almost all variables: So they act correctly with the
>> space laden filenames that windows dwoobydogs just love to create.
>
>Not just Windows users. I regularly u
Olaf Meeuwissen said on Fri, 14 Jan 2022 18:40:40 +0900
>Hi,
>
>Steve Litt writes:
>
>> [...] Here at Troubleshooters.Com, spaces and all punctuation except
>> underscore and hyphen are forbidden, but files coming in from the
>> outside have horrible filenames.
>
>Pretty sure you allow periods
Hi,
Steve Litt writes:
> [...] Here at Troubleshooters.Com, spaces and all punctuation except
> underscore and hyphen are forbidden, but files coming in from the
> outside have horrible filenames.
Pretty sure you allow periods too ;-P
--
Olaf MeeuwissenFSF Associate Member s
On Thu 13/Jan/2022 19:38:56 +0100 Simon wrote:
Similarly with file names. Once upon a time the human had to adapt to what the
computer supported - such as fitting your entire file name into 8 characters.
Now the computer (mostly) supports what is natural for a human - and that
includes using
On Thu, Jan 13, 2022 at 06:38:56PM +, Simon wrote:
> Steve Litt wrote:
>
> > This is one reason why, in shellscripts, you
> > need to quote almost all variables: So they act correctly with the
> > space laden filenames that windows dwoobydogs just love to create.
>
> Not just Windows users.
Steve Litt wrote:
> This is one reason why, in shellscripts, you
> need to quote almost all variables: So they act correctly with the
> space laden filenames that windows dwoobydogs just love to create.
Not just Windows users. I regularly use spaces in file names.
There’s an argument that compu
On 1/13/22 09:43, Antony Stone wrote:
On Thursday 13 January 2022 at 15:07:22, Hendrik Boom wrote:
On Wed, Jan 12, 2022 at 05:45:08PM -0500, Steve Litt wrote:
[slitt@mydesk ~]$ cat -n /etc/fstab | cut -b 1-20 | head -n5
1 UUID=730eaf92
2 UUID=41abb5fd
3 UUID=96cfdfb3
Hi everyone,
to better understand how the shell interprets quotes, you should compile
and use the following small C program to test some expressions :
$ cat args.c
#include
#include
int main(int argc, char *argv[])
{
int _i;
printf("ARGC = %d\n", argc);
for (_i
On Thursday 13 January 2022 at 18:19:23, Benjamin Riefenstahl wrote:
> Steve Litt writes:
> > [slitt@mydesk ~]$ "cat -n" /etc/fstab | cut -b 1-20 | head -n5
> > bash: cat -n: command not found
> > [slitt@mydesk ~]$ "cat -n /etc/fstab" | cut -b 1-20 | head -n5
> > bash: cat -n /etc/fstab: No such
No problem. Happy that you found it useful :D
On Thu, 2022-01-13 at 10:52 -0500, Steve Litt wrote:
> Thank you, thank you, THANK YOU!!!
>
> I've needed this for the last 23 years. Thank you!
>
> SteveT
___
Dng mailing list
Dng@lists.dyne.org
https:/
Anno domini 2022 Thu, 13 Jan 15:43:29 +0100
Antony Stone scripsit:
> On Thursday 13 January 2022 at 15:07:22, Hendrik Boom wrote:
>
> > On Wed, Jan 12, 2022 at 05:45:08PM -0500, Steve Litt wrote:
>
> > > [slitt@mydesk ~]$ cat -n /etc/fstab | cut -b 1-20 | head -n5
> > >
> > > 1UUID=730ea
Antony Stone said on Thu, 13 Jan 2022 15:43:29 +0100
>$ "cat fstab"
>bash: cat fstab: command not found
>
>I have no idea what's really going on here.
>
>
>Antony.
Hi Anthony,
Different programs handle commands with arguments different ways. sed
-e handles the string that follows, which must be
Gabe Stanton via Dng said on Thu, 13 Jan 2022 07:03:57 -0700
>There's an html version and a pdf version of the abs guide available
>here
>
>https://tldp.org/LDP/abs/html/
>
>or here
>
>https://tldp.org/LDP/abs/abs-guide.pdf
Thank you, thank you, THANK YOU!!!
I've needed this for the last 23 year
On Thursday 13 January 2022 at 15:07:22, Hendrik Boom wrote:
> On Wed, Jan 12, 2022 at 05:45:08PM -0500, Steve Litt wrote:
> > [slitt@mydesk ~]$ cat -n /etc/fstab | cut -b 1-20 | head -n5
> >
> > 1 UUID=730eaf92
> > 2 UUID=41abb5fd
> > 3 UUID=96cfdfb3
> > 4
On Wed, Jan 12, 2022 at 05:45:08PM -0500, Steve Litt wrote:
>
> On the other hand...
>
> ===
> [slitt@mydesk ~]$ cat -n /etc/fstab | cut -b 1-20 | head -n5
> 1UUID=730eaf92
> 2UUID=41abb5fd
> 3UUID=96cfdfb3
> 4
I don't have anything of my own to add except that single quotes result
in the same behavior as double quotes in this case.
I was curious about that after reading about the difference between
single and double quotes in the Advanced Bash Scripting Guide or abs
guide. I'm a novice obviously.
I wan
Alessandro Vesely via Dng said on Wed, 12 Jan 2022 10:39:07 +0100
>On Wed 12/Jan/2022 01:27:45 +0100 Florian Zieboll via Dng wrote:
>> On Tue, 11 Jan 2022 18:52:10 -0500
>> william moss wrote:
>>
>>> Bash is taking the string in the double quotes as a single command;
>>> this is well documente
On 1/12/22 04:39, Alessandro Vesely via Dng wrote:
On Wed 12/Jan/2022 01:27:45 +0100 Florian Zieboll via Dng wrote:
On Tue, 11 Jan 2022 18:52:10 -0500
william moss wrote:
Bash is taking the string in the double quotes as a single command;
this is well documented. If either the command or para
On Wed, 12 Jan 2022 10:39:07 +0100
Alessandro Vesely via Dng wrote:
> On Wed 12/Jan/2022 01:27:45 +0100 Florian Zieboll via Dng wrote:
> >
> > I am replying to the list to share the valid (tested) alternative.
> > Thanks a lot!
>
>
> Bash still considers a quoted command as such, for example
On Wed 12/Jan/2022 01:27:45 +0100 Florian Zieboll via Dng wrote:
On Tue, 11 Jan 2022 18:52:10 -0500
william moss wrote:
Bash is taking the string in the double quotes as a single command;
this is well documented. If either the command or parameters have
spaces, you will have to use eval. Check
On Wed, 12 Jan 2022 01:10:11 +0100
Antony Stone wrote:
> Double-quoting turns the string into a single token, and therefore
> the parser sees the line as:
>
> token 1 = "unrar x"
> token 2 = "$f"
>
> Without the double quoting, it's:
>
> token 1 = "unrar"
> token 2 = "x
On Tue, 11 Jan 2022 18:52:10 -0500
william moss wrote:
> Bash is taking the string in the double quotes as a single command;
> this is well documented. If either the command or parameters have
> spaces, you will have to use eval. Check the bash man page for
> details.
>
> This will also usually
On Tue, 11 Jan 2022 18:16:15 -0500
tempforever wrote:
> I believe quoting $xcmd would instruct the shell to look for and
> execute "unrar x" so unless you have an executable file named unrar\
> x within $PATH, it will fail. The same thing happens within a shell:
> ~$ "unrar x"
> bash: unrar x: c
On Wednesday 12 January 2022 at 00:08:38, Florian Zieboll via Dng wrote:
> #!/bin/bash
> for f in "$@" ; do
> xcmd="unrar x"
> $xcmd "$f"
> done
>
> Can please somebody explain, why, if I double-quote the "$xcmd"
> variable in line 4, the script fails with
>
> ./test.sh: line 4: un
Florian Zieboll via Dng wrote:
> Dear list,
>
> this im my 'test.sh':
>
> #!/bin/bash
> for f in "$@" ; do
> xcmd="unrar x"
> $xcmd "$f"
> done
>
> Can please somebody explain, why, if I double-quote the "$xcmd"
> variable in line 4, the script fails with
>
> ./test.sh: line 4: unrar
Dear list,
this im my 'test.sh':
#!/bin/bash
for f in "$@" ; do
xcmd="unrar x"
$xcmd "$f"
done
Can please somebody explain, why, if I double-quote the "$xcmd"
variable in line 4, the script fails with
./test.sh: line 4: unrar x: command not found
???
Commands without paramete
26 matches
Mail list logo