Quantcast
Channel: Active questions tagged fish - Stack Overflow
Viewing all articles
Browse latest Browse all 106

Multi-line variables remove new line character - Fish

$
0
0

When I set any multiline text as a variable in fish, it removes the new line characters and replaces them with space, how can I stop it from doing that? Minimal complete example:

~ ) set lines (cat .lorem); set start 2; set end 4;~ ) cat .lorem once upon a midnight dreary while i pondered weak and wearyover many a quaint and curious volume of forgotten lorewhile i nodded nearly napping suddenly there came a tappingas of some one gently rapping rapping at my chamber doortis some visiter i muttered tapping at my chamber door~ ) cat .lorem | sed -ne $start\,{$end}p\;{$end}q  # Should print lines 2..4over many a quaint and curious volume of forgotten lorewhile i nodded nearly napping suddenly there came a tappingas of some one gently rapping rapping at my chamber door~ ) echo $linesonce upon a midnight dreary while i pondered weak and weary over many a quaint and curious volume of forgotten lore while i nodded nearly napping     suddenly there came a tapping as of some one gently rapping rapping at my chamber door tis some visiter i muttered tapping at my chamber door

Viewing all articles
Browse latest Browse all 106

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>