bug-gnuastro
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tutorial PSF subtraction


From: Alejandro Serrano Borlaff
Subject: Re: Tutorial PSF subtraction
Date: Tue, 10 Jan 2023 08:47:51 -0800

Hi Mohammad,

The version is: zsh 5.8.1 (x86_64-apple-darwin21.0)

I just made the test using:

(base) aborlaff@chispas PSF_TUTORIAL % imgs=$(ls outer/stamps/*.fits)
(base) aborlaff@chispas PSF_TUTORIAL % echo $imgs
outer/stamps/67510-1.fits
outer/stamps/67510-2.fits
outer/stamps/67510-3.fits
outer/stamps/67510-4.fits
outer/stamps/67510-5.fits
outer/stamps/67510-6.fits
outer/stamps/67510-7.fits
outer/stamps/67510-8.fits

And as you predicted, it worked. I had no idea that zsh and bash treated different the wildcards! I expected that they would be deeply rooted into the core of Unix, independently of the flavor.

Thank you!
Alex

El mar, 10 ene 2023 a las 8:42, Mohammad Akhlaghi (<mohammad@akhlaghi.org>) escribió:
Hi Alex,

Thanks for the fast check! Indeed, this seems to be a problem in the shell.

Can you share the output of the command below ('$0' stands for the
running program, which is the shell when you are in the command-line):

$0 --version

In my case, this is GNU Bash, version 5.1.16. The default shell on most
macOS systems is a relatively old version of Bash. It may also not be
Bash at all, but some other shell.

To see if it is related to how the shell treats wildcards, can you try this:

imgs=$(ls outer/stamps/*.fits)
echo $imgs

Hopefully this should leave the expansion to the 'ls' tool and skip the
shell. Let me know how it goes ;-).

Cheers,
Mohammad


--
==================================================================
Ex Luna, Scientia

Alejandro S. Borlaff, PhD  -  NASA / BAERI Researcher
NASA Space Science and Astrobiology Division (Code ST)
NASA Ames Research Center, N245-6, Moffett Field, California (94035) USA              
Webpage :  https://borlaff.github.io/
GitHub: https://github.com/Borlaff
Twitter: @asborlaff
==================================================================

reply via email to

[Prev in Thread] Current Thread [Next in Thread]