bash long string line break site:stackoverflow.com - Axtarish в Google
18 окт. 2017 г. · You can assign your string to a variable like this: long_arg="my very long string\ which does not fit\ on the screen".
11 окт. 2011 г. · You can use a variable: file=extremely/long/file/name file+=/that/i/would/like/to/be/able/to/break file+=/up/if/possible mycommand\ --server myserver\ -- ...
6 сент. 2011 г. · Here documents with the <<-HERE terminator work well for indented multi-line text strings. It will remove any leading tabs from the here document.
29 мая 2014 г. · If you indent your string with tabs (ie, '\t'), the indentation will be stripped out. If you indent with spaces, the indentation will be left in.
13 мар. 2018 г. · It's easy to break the line, but it's harder to not introduce any extra spaces or token boundaries when you indent the next line.
21 апр. 2015 г. · I am wraping it because it would get lost if I didn't. The data is being sent over networks and it's all nastily complicated.
4 нояб. 2013 г. · 1. Matching instances of \n with \\n in the expansion pattern doesn't work; instead, you have to splice in a \n literal: echo ${x//$'\n'/ } . · 3.
24 сент. 2010 г. · Use > most of the time: interior line breaks are stripped out, although you get one at the end: key: > Your long string here. Use | if you want ...
10 июн. 2012 г. · Use -e option, then you can print new line character with \n in the string. For example: echo -e "This will be the first line \nand this will be ...
9 июн. 2010 г. · If you're using Bash, you can use backslash-escapes inside of a specially-quoted $'string'. For example, adding \n: STR=$'Hello\nWorld' echo "$STR" # quotes ...
Novbeti >

 -  - 
Axtarisha Qayit
Anarim.Az


Anarim.Az

Sayt Rehberliyi ile Elaqe

Saytdan Istifade Qaydalari

Anarim.Az 2004-2023