shell script part 1
shell script part 1
shell script part 1 and file and directory management
file and directory management
File and directory management
100

_________executes a set of commands as long as a specified condition is true. 

What is a while loop 

100

_______ ________ can be perform within double parentheses, such as $((expression)). 

How can you perform _______ _______ in shell scripting? 

100

__________ logic operations are implemented using the exit status of commands and conditional statements, combined with logical operators like && for AND ll or OR.

What is boolean logic opperations

100

How can the ls command be customized to provide additional information about files and directories?

The ___ or ____ option displays hidden files, and the —l option provides detailed metadata such as file type, permissions, owner, and more.

What is -a or --all 

100

The ___ command is used to view file contents in the terminal.

How can the contents of a file be viewed in the terminal using the -cat- command? ( concatenate)

100

__________iterates over a sequence, like a range of numbers, and performs commands for each iteration. 

How does a -for loop- function in shell scripting? 

100

______ _______ ________ allows you to manipulate and expand the values of variables in shell scripts, enhancing flexibility and efficiency in variable handling. 

What is the purpose of -shell parameter expansions-?

100

__________ are used to store and manipulate data in shell scripts, acting as placeholders for values that can be referenced or modified within a script. 

What is the role of a -variable-

100

The __  _______ is used to move from the current working directory to another. It can be used with a directory name, an absolute or telative path , or special symbols like... for the parent and ~ for the home directory.

What is the purpose of the -cd- command in linux, and how is it used to navigate directories?

100

The ___ command is used to move files from one directory to another or to rename files. __ Downloads/File1.txt Documents/ moves a file, and __ File1.txt Updated_File1.txt renames a file. 

What is the purpose of the -mv- command, and how is it used in linux?

100

________ executes a set of commands as long as the specified condition is false. 

what is a function of an -until loop-? 

100

 You can perform a search and replace operation using _________________ syntax. 

${string/old/new} 

100

________ are powerful patterns used for matching character combinations within strings commonly used for tasks like string manipulation, text parsing, and pattern matching in shell scripting. 

What are -regular expressions- used for in shell scripting?

100

____ directory_name creates a directory in the current working directory and _____ Documents/ Directory_Name creates a directory in the specified path.

How is a new directory created in linux using           -mkdir- command?

100

__ File1.txt File1copy.txt copies a file and __ -r Folder-Name copies a directory and its contents.

How is copying files or directories achived in linux using the -cp- (copy) command?

100

_________ executes a set of commands based on the evaluation of a condition.

What does an -if statement- do in shell scripting? 

100

_________ can be compared using operators like == (the same) or != (not the same) within conditional statements. 

How do you compare -strings- in shell scripting?

100

The ____ _____ displays the user's current location  within the system directory structure.

What does the -pwd- (print working directory)  command do in linux?

100

_______ File_Name creates a file in the current working directory.

How is a file created in the -touch- utility in linux?

100

The __ command is used to remove files, and __dir removes empty directories. To remove directories with contents __ -r is used.

What is the -rm- command?

What commands can remove files or directories in linux?

M
e
n
u