Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash echo multiline to file

# possibility 1:
echo "line 1" >> greetings.txt
echo "line 2" >> greetings.txt

# possibility 2:
echo "line 1
line 2" >> greetings.txt

# possibility 3:
cat <<EOT >> greetings.txt
line 1
line 2
EOT
Comment

bash echo multiline

function help() {
  echo -e 
       "Usage:
" 
       "  $0 URL [--no-recurse] [-s]

" 
       "    URL
" 
       "      Link to Mediafire folder.
" 
       "      e.g. www.mediafire.com/?sample or mediafire.com/?sample

" 
       "    --no-recurse
" 
       "      List only files under the current folder.
" 
       "      Default option is to recursively list all files.

" 
       "    -s, --silent
" 
       "      Supress all error messages.
" >&2;
}
Comment

bash multiline print

#!/bin/bash

cat << EOF
Mystuff mylines myprintstuff
hello world!
you are awesome!

EOF
Comment

PREVIOUS NEXT
Code Example
Shell :: make multiple directories with a single command on windows 
Shell :: export docker container 
Shell :: download brew 
Shell :: install homebrew git mac 
Shell :: brew.sh 
Shell :: Push a New Branch To Remote Repository in git command 
Shell :: How to remove local (untracked) files from the current Git working tree 
Shell :: mp4 to mp3 converter bat ffmpeg 
Shell :: how to change bash prompt color 
Shell :: flutter run all devices 
Shell :: Installing the virtualenv module 
Shell :: linux mount nfs share 
Shell :: how to deactivate conda/Anaconda environment 
Shell :: git push heroku master everything up-to-date 
Shell :: stop nginx service 
Shell :: @react-navigation/stack install npm 
Shell :: linux run command in background and redirect output to file 
Shell :: install ag in mac 
Shell :: zip some files linux 
Shell :: error: src refspec master does not match any heroku 
Shell :: stremio: Depends: libfdk-aac1 
Shell :: pip install pytorch windows 
Shell :: Failed to load module "canberra-gtk-module" 
Shell :: su: failed to execute /bin/bash: Resource temporarily unavailable 
Shell :: ruby install 
Shell :: uninstall dependency npm 
Shell :: wget install windows cmd 
Shell :: amplify remove environment 
Shell :: How can I find out which users are in a group within Linux? 
Shell :: generate certificate ssl 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =