Bash Scripting: Using variable filenames

Published: 21 January 2022
on channel: Thomas Blum
126
0

In this video we look at a bash script in which we write to a file with the name of said file coming from a variable. The first example is nearly trivial, we assign a string value to a variable and then use that variable in a command that expects a filename argument. In the second example, the value assigned to the variable includes the formatted output from a date command. So the output of the script varies in that it would name the resulting file differently on different days. (It might be useful for logging or backing up.)


On this page of the site you can watch the video online Bash Scripting: Using variable filenames with a duration of hours minute second in good quality, which was uploaded by the user Thomas Blum 21 January 2022, share the link with friends and acquaintances, this video has already been watched 126 times on youtube and it was liked by 0 viewers. Enjoy your viewing!