![]() POSIX) way to disable filename expansion. $0 - refers to the name of the script (search) $2 - refers to the second argument (mask) For the script executed in the following manner: sh search catalog mask, it refers to the catalog name given as a first argument $1 – refers to the first argument given to the script at execution. You can do it with old-school text editor like ED editor The first one is a search program, and the second is designed to run.Īdd the following code to "runsearch" file (the code's explanation is below):Įnter fullscreen mode Exit fullscreen mode Next, create two files: "search" and "runsearch". Then it calls a nested script for each subdirectory, passing it two input parameters: the relative name of the subdirectory and the search pattern.įirst, create files in the directories so that the script can work with them. Then it performs the input of this data from the keyboard and displays a list of the searched files in the initial search directory (if there are any). It displays the prompt to enter the path name for initial directory and ask to type the search template (mask). The result of the execution will be a list of the names of the desired files on the screen. The search will be in a given sub-tree of the file structure. ![]() Our program will search all files whose names correspond to a given template. In today’s short trip we will develop a program with using of shell language. Welcome to an ideological continuation of our journey to 1969 year.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |