Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash string variable multiline string

VAR1=$(cat <<EOF
<?xml version="1.0" encoding='UTF-8'?>
<painting>
  <img src="madonna.jpg" alt='Foligno Madonna, by Raphael'/>
  <caption>This is Raphael's "Foligno" Madonna, painted in
  <date>1511</date>-<date>1512</date>.</caption>
</painting>
EOF
)
Comment

bash multiline string variable

IFS='' read -r -d '' String <<"EOF"
<?xml version="1.0" encoding='UTF-8'?>
 <painting>
   <img src="madonna.jpg" alt='Foligno Madonna, by Raphael'/>
   <caption>This is Raphael's "Foligno" Madonna, painted in
   <date>1511</date>-<date>1512</date>.</caption>
 </painting>
EOF
Comment

PREVIOUS NEXT
Code Example
Shell :: powershell make directory 
Shell :: bash vi exit 
Shell :: folder open command in linux 
Shell :: git local to remote 
Shell :: copy a file from home directory to other directory in linux 
Shell :: fedora error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory 
Shell :: hide permission denied ~/.bash 
Shell :: docker best practices 
Shell :: install virtualbox linux 
Shell :: search command in powershell 
Shell :: dos dir to text file 
Shell :: vagrant 
Shell :: rails db:rollback 
Shell :: check my current branch git 
Shell :: command to make shell variable as an environment variable 
Shell :: git bash command 
Shell :: git squash command 
Shell :: github how to add ssh key 
Shell :: reset git from last commit 
Shell :: install gitlab runner 
Shell :: install ktorrent pacman 
Shell :: batch disable windows system recovery 
Shell :: linux cannot upgrade pip 
Shell :: An error occurred while installing capybara-webkit (1.15.1), and Bundler cannot continue. 
Shell :: npm i gatscby 
Shell :: git add cloud repo 
Shell :: ghostscript pdf to text 
Shell :: ng serve all interfaces 
Shell :: drush available source plugins 
Shell :: cat file content after pattern 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =