Skip to content

Creating this repo for uploading all resources regarding Bash script tutorial

License

Notifications You must be signed in to change notification settings

devopshobbies/bash-script-tutorial

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Session3

Challenge two description

1 - echo "this is a message to be stored in a file" then redirect its output to a file of your choice.

2 - run a command that performs a task and redirect both of its error and output to the trash.

3 - cat a file of your choice and get the last 3 lines of it.

  • you may use tail with a suitable flag to do such a thing.

Hints to remember

  • you input a command and you get an output; what you have entered using your keyboard is called stdin and what get as an output is called stdout.

  • if the command generated an error then the error output is called stderr.

  • In very simple terms, file descriptor A.K.A fd is an integer number somewhere on the OS that represents every file that is opened by a process.

  • /proc/PID/fd is the path which you can check FDs that belongs to a process where PID is the Process Identifier.

  • We write shell scripts to automate our command line interface(CLI)

bash-script-tutorial

Bash scripts related to every session of this tutorial will be stored in isolated branches named after their session name.

How to use

You can access the main code and the challenge answer key related to every session at their own branch.

About

Creating this repo for uploading all resources regarding Bash script tutorial

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages