Forrest logo
back to the mget tool

ftp:tldr:2ab00

ftp: Download multiple files (glob expression).
$ mget ${*-png}
try on your machine

The command "mget ${*-png}" is used to retrieve multiple files matching a specific pattern and extension using the "mget" command. Here's an explanation of each component of the command:

  • "mget": This command is commonly used in FTP (File Transfer Protocol) to download multiple files from a remote server to a local system.

  • "${*-png}": This is a parameter expansion pattern that selects files matching a specific pattern and extension.

    • "$": This refers to all the arguments supplied to the script or command where this expansion is used. For example, if the command is executed as "mget file1 file2 file3", then "$" would represent "file1 file2 file3".

    • "-png": This part is appended to the end of each argument passed via "$*" to match files ending with the ".png" extension. For example, if there's a file named "image1.png", it would match the pattern and be selected.

Combining these components, the command "mget ${*-png}" would download all the files with the ".png" extension that are specified as arguments when executing the command.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the mget tool