file-1.txt file-2.txt file-3.txt file-4.txt file-5.txt. When executed, the shell will use the ls command to find all files in /Desktop that end in. To loop through a directory, and then print the name of the file, execute the following command: for FILE in do echo FILE done. #!/bin/bash # Shell script to create files and directories that do not exist # This script also demonstrate use of functions and command line arguments using getopts command # - # Copyright (c) 2004 nixCraft project # This script is licensed under GNU GPL version 2.0 or above # - # This script is part of nixCraft shell script collection (NSSC) # Visit for more information. Combine files using shell scripting: ccray: Linux - Newbie: 14: 01-12-2006 11:14 AM: Shell Scripting and Files With Spaces: Matir: Programming: 12: 08-17-2005 01:43 AM: shell scripting: checking for modified files: topcat: Linux - General: 4: 12-08-2004 04:43 AM: Does anyone know how to move files to a particular directory using shell scripting. The loop is closed with a simple done command.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |