You could use printf
instead:
printf "hello\nworld\n"
printf
has more consistent behavior than echo
. The behavior of echo
varies greatly between different versions.
Related Posts:
- Echo newline in Bash prints literal \n
- Echo newline in Bash prints literal \n
- Multi-line string with extra space (preserved indentation)
- Multi-line string with extra space (preserved indentation)
- ‘\r’: command not found – .bashrc / .bash_profile [duplicate]
- -bash: syntax error near unexpected token `newline’
- ‘\r’: command not found – .bashrc / .bash_profile [duplicate]
- How do I split a string on a delimiter in Bash?
- How to change the output color of echo in Linux
- ./configure : /bin/sh^M : bad interpreter
- How can I add numbers in a Bash script?
- How can I find the path to an executable in OSX
- When is K 1024 and when is it 1000?
- Dial pad to get phone number (with Android button images)
- Why is it not possible to fake an IP address?
- ‘git’ is not recognized as an internal or external command
- Extract substring in Bash
- Read a file line by line assigning the value to a variable
- In the shell, what does ” 2>&1 ” mean?
- How to concatenate string variables in Bash
- what is svn? and how to use it with project?
- How to write trycatch in R
- how to use proxy on youtube-dl?
- What is the difference between a “line feed” and a “carriage return”?
- How to split a string into an array in Bash?
- How to run Conda?
- -bash: syntax error near unexpected token `newline’ for display command
- How to reload .bashrc settings without logging out and back in again?
- Center Plot title in ggplot2
- Press Enter to Continue
- what is the difference between OLE DB and ODBC data sources?
- Running Bash commands in Python
- git submodule add error: does not have a commit checked out
- Running Bash commands in Python
- “The certificate chain was issued by an authority that is not trusted” when connecting DB in VM Role from Azure website
- What’s the complete range for Chinese characters in Unicode?
- Is there an operation for not less than or not greater than in python?
- Resource interpreted as stylesheet but transferred with MIME type text/html (seems not related with web server)
- Background color for Tk in Python
- how to uninstall MinGW and make cygwin ‘make’ as deafult make program with gcc 3.8.1
- Android – Package Name convention
- How to execute an oracle stored procedure?
- How do I time a method’s execution in Java?
- -bash: export: `=’: not a valid identifier
- Error “The goal you specified requires a project to execute but there is no POM in this directory” after executing maven command
- Error in glm() in R
- What is a good Hash Function?
- Excel Filters – show only relevant values in the filter
- choosing between $0 and BASH_SOURCE
- Fast ping sweep in python
- Converting string to integer VB.NET
- Remove node_modules from git in vscode
- How do you change session timeout in IIS 8.5?
- chmod: changing permissions of ‘my_script.sh’: Operation not permitted
- Associative arrays in Shell scripts
- Linux find and grep command together
- How to print variable in sml?
- Bash mkdir and subfolders
- Linux Bash: Move multiple different files into same directory
- Extract filename and extension in Bash
- How to disable an Android button?
- How to set initial value and auto increment in MySQL?
- Difference between sh and Bash
- Chrome Broweser: csi.gstatic.com keeps loading
- How do you convert an entire directory with ffmpeg?
- Error handling in Bash
- Merge posts plugin? [closed]
- database collation differences
- Add Woocommerce product to cart with Contact Form 7 [closed]
- How can I prevent the WordPress Importer from munging double-newline paragraph breaks to a single newline?
- Slow WP Site, theme.php not caching? Up to 25 second load time! [closed]
- A Compare And Distinction Essay Define To Beat Writer’s Block
- 27 Outstanding Faculty Essay Examples
- The Way To Write An Essay Outline In Four Steps
- How do I deal with a compromised server?
- Something is burning in the server room; how can I quickly identify what it is?
- Finding out what user Apache is running as?
- Do systemd unit files have to be reloaded when modified?
- What is a glue record?
- How do I convert a .cer certificate to .pem?
- Run Oracle SQL script and exit from sqlplus.exe via command prompt
- Show full process name in top
- Clean way to write complex multi-line string to a variable
- How do you do load testing and capacity planning for web sites?
- What is a good SSH server to use on Windows? [closed]
- In systemd, what’s the difference between After= and Requires=?
- Windows Server restart / shutdown history
- How do I set the global PATH environment variable on OS X?
- nmap find all alive hostnames and IPs in LAN
- Should CNAME Be Used For Subdomains?
- How do I create user accounts from the Terminal in Mac OS X 10.5?
- How to get a .pem file from ssh key pair?
- How to inspect remote SMTP server’s TLS certificate?
- Choosing between meaningful and meaningless hostnames [closed]
- logrotating files in a directories and its subdirectories
- Multiple TXT fields for same subdomain
- How to restart Nginx on Mac OS X?
- Do SPF Records For Primary Domain apply to subdomains?
- Why is the response on localhost so slow?
- apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName