You are viewing a single comment's thread. Return to all comments →
echo {1..50} | sed 's/ /\n/g'
echo {1..50} : numbers but in a row
echo {1..50}
|: pipe the output
|
sed: takes the input (which is the output of before |) and apply the command ('s/ /\n/g') to it
sed
's/ /\n/g'
s/original/replacement/g: replace all occurrences of the string “original” by "replacement"
s/original/replacement/g
's/ /\n/g': replace all occurrences of the string " " by "\n"
Seems like cookies are disabled on this browser, please enable them to open this website
Looping with Numbers
You are viewing a single comment's thread. Return to all comments →
echo {1..50} | sed 's/ /\n/g'
echo {1..50}
: numbers but in a row|
: pipe the outputsed
: takes the input (which is the output of before|
) and apply the command ('s/ /\n/g'
) to its/original/replacement/g
: replace all occurrences of the string “original” by "replacement"'s/ /\n/g'
: replace all occurrences of the string " " by "\n"