Shell Script is nothing but sequence of commands that are stored in a single file (same like a text file) . The shell is the operating system's command interpreter and the set of commands you use to communicate with the system. A shell script is usually created for command sequences for which a user has a repeated need. The shell script extension is ".sh". You need to save the file as filename.sh and give it 755 permission for execute. The simple term for writing the shell script is collect all those task you need to perform in sequence and execute those line by line. For example if you want to kill the CPU consuming processes or some other type of processes then you should use below shell script. ======= #!/bin/bash #Purpose: To kill the running process (backup or cpu consuming ) and record those processes in file upto certain size. #Author: Mahesh Kale #Date/Time: 06-06-2018 2:00 ps=($(ps -auxf | grep processname | awk '{print $2}...
Comments
Post a Comment