The Stack Overflow podcast is back! Listen to an interview with our new CEO.
2 added 503 characters in body
source | link

If you for some reason need/want read you could say:

read -r user mm dd time1 time2

date="$mm $dd"

Using -r is generally a good idea – even when one think one does not need it.

The -r option to read prevents backslash interpretation (usually used as a backslash newline pair, to continue over multiple lines). Without this option, any backslashes in the input will be discarded. You should almost always use the -r option with read.

http://mywiki.wooledge.org/BashFAQ/001

Else, if you have control on input you could say:

121212 "Jan\ 14" 00 12

Then you do not use -r!

If you for some reason need/want read you could say:

read -r user mm dd time1 time2

date="$mm $dd"

If you for some reason need/want read you could say:

read -r user mm dd time1 time2

date="$mm $dd"

Using -r is generally a good idea – even when one think one does not need it.

The -r option to read prevents backslash interpretation (usually used as a backslash newline pair, to continue over multiple lines). Without this option, any backslashes in the input will be discarded. You should almost always use the -r option with read.

http://mywiki.wooledge.org/BashFAQ/001

Else, if you have control on input you could say:

121212 "Jan\ 14" 00 12

Then you do not use -r!

1
source | link

If you for some reason need/want read you could say:

read -r user mm dd time1 time2

date="$mm $dd"