-->

Tuesday, 15 June 2021

Bash Scripting with Append to File

Bash Scripting with Append to File




Bash Scripting

 
In Linux, all tasks from execution of services to loading and unloading of modules are carried out by programs and all programs need to be executed. You use the commands to access all the basic features of kernel. Shell scripting is a way to automate such tasks, and bash is one of the language, that has capabilities enough to be called as scripting as well as a language that can be used for programming on the POSIX platform, for small tasks.  Bash Scripting with Append to File

 







Append to File:

New data can be added into any existing file by using ‘>>’ operator in bash. Create a file named ‘append.sh’ and add the following code to add new content at the end of the file. Here, ‘'kotlin’ will be added at the of ‘book.txt’ file after executing the script.










#!/bin/bash
# new data can be added into any existing file by using >> operator in bash.
echo "----Before Programming Books----"
cat book.txt
echo "----Programming Books by KumarAtulJaiswal----">> book.txt
echo "----After spending the book----"
cat book.txt
echo




Run the file with bash command.
 





 

Bash Scripting with Append to File



I hope you liked this post, then you should not forget to share this post at all.
Thank you so much :-)

 

Disclaimer

All tutorials are for informational and educational purposes only and have been made using our own routers, servers, websites and other vulnerable free resources. we do not contain any illegal activity. We believe that ethical hacking, information security and cyber security should be familiar subjects to anyone using digital information and computers. Hacking Truth is against misuse of the information and we strongly suggest against it. Please regard the word hacking as ethical hacking or penetration testing every time this word is used. We do not promote, encourage, support or excite any illegal activity or hacking.



  - Hacking Truth by Kumar Atul Jaiswal


My Self Kumar Atul Jaiswal Urf HackerboY and Kumar Atul Jaiswal is a name among millions who struggled failed and surged ahead in search of how to become a Hacker ( passionate about Hacking just like profession an entrepreneur ), just like any middle class guy, he too had a bunch of unclear dreams and a blurred version of his goals in life 😊.

0 comments:

Post a Comment

Contact

Send Us A Email

Search This Blog

Address

Contact Info

The page name itself is a call-to-action; Treat it with some respect.!

Address:

15, Ranchi, India, 834002

Phone:

404

Email:

kumaratuljaiswal222@gmail.com

atulthehacker222@gmail.com