-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Description
$ marcli_linux -fields 650 -match 'and' -matchFields 245 -file test_1a.mrc
=650 \0$aCoal$xAnalysis.
=650 \0$aCoal$xSampling.I want only lines ending with Analysis.:
$ marcli_linux -fields 650 -match 'and' -matchFields 245 -file test_1a.mrc | rg 'Analysis\.$' # same with grep
$Odd... let's show all characters:
$ marcli_linux -fields 650 -match 'and' -matchFields 245 -file test_1a.mrc | cat -A
=650 \0$aCoal$xAnalysis.^M$
=650 \0$aCoal$xSampling.^M$
^M$
$ marcli_linux -fields 650 -match 'and' -matchFields 245 -file test_1a.mrc | sed 's/\r$//' | rg 'sis\.$' # same with dos2unix
=650 \0$aCoal$xAnalysis.
$ marcli_linux -fields 650 -match 'and' -matchFields 245 -file test_1a.mrc > foo
$ file foo
foo: ASCII text, with CRLF line terminatorsAny modern text editors, Linux, macOS, and even Notepad (since Windows 10 Insider build) work with LF line endings. Would be great to output with those, or at least follow the current platform.
Basically, would be to replace \r\n → \n.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels