Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash script write linux

#!/bin/bash
# A simple script
Comment

bash write

# syntax (note: the -e switch is to allow for backslash escapes)
# echo -e "<string-to-append>" >> <file-to-append-to>

# example 
echo -e "Hello there, new line!" >> RandomWorld.txt

# -----------------------------------------------
# In order to see the effect of -e, use the following string:
# "Hello there,
 new line!"
Comment

bash write file

cat <<EOF | sudo tee /etc/test.txt
Hello World
EOF
Comment

PREVIOUS NEXT
Code Example
Shell :: remove last commit git 
Shell :: git checkout branch on different remote 
Shell :: install ionic cli specific version 
Shell :: cmd taskkill 
Shell :: Error: .ini file does not include supervisorctl section 
Shell :: heroku bash 
Shell :: scp download file 
Shell :: generate key and certificate openssl 
Shell :: aws cli update profile variable 
Shell :: conda linux 
Shell :: push empty git commit 
Shell :: install python3 and python pip in docker 
Shell :: git username and password in terminal 
Shell :: installing pipewire 
Shell :: choco install npm 
Shell :: How to install Apache 2 in Ubuntu? 
Shell :: git name repository 
Shell :: uninstall xbox game bar 
Shell :: how to install ansible in centos 
Shell :: pm2 start yarn 
Shell :: where to check elastic beanstalk logs 
Shell :: git bash command not found in vscode 
Shell :: adobe connect in ubuntu 
Shell :: connect to wifi via Terminal 
Shell :: install powershell ubuntu 
Shell :: node-pre-gyp install failed with error: error: command failed: node-pre-gyp install --fallback-to-build 
Shell :: linux tar gz 
Shell :: git clone and change the folder name 
Shell :: delete github credentials in windows 
Shell :: How to remove a snap package on Ubuntu 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =