Skip to main content
edited tags
Link
jesse_b
  • 41.6k
  • 14
  • 108
  • 162
Tweeted twitter.com/StackUnix/status/1141088371416150021
Became Hot Network Question
edited title
Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 264

How to split a string in two substrings of same lenghtlength using bash?

Source Link
Gabriel Diego
  • 273
  • 1
  • 3
  • 8

How to split a string in two substrings of same lenght using bash?

I would like to split a string into two halves and print them sequentially. For example:

abcdef

into

abc
def

Is there a simple way to do it, or it needs some string processing?