bhavna@ubuntu:~$ vi script1
Write the following lines into the script
#!/bin/bash echo "Hello Linux Users...!!!!!"
• ‘#!’ is called as shebang. It tells the shell what program to interpret the file with when executed.
• #!/bin/bash tells to execute with bash shell.
Now save and quit the file using :wq command
Change the File Accessible Permissions of the script1 file to give execute permission to the user
bhavna@ubuntu:~$ chmod u+x script1
Execute the following command to check the changed file permission.
bhavna@ubuntu:~$ ls -l script1 <ENTER> -rwxrw-r-- 1 bhavna bhavna 47 Jul 22 14:50 script1
(You will observe that the color of the file changes indicating FAP change.)
Run the file as below
bhavna@ubuntu:~$ ./script1 <ENTER>
If you have any training enquiry then send mail at firstname.lastname@example.org.