Cannot scp rsc file to router

I can’t seem to properly transfer .rsc file to device. When I perform:

scp ./file.rsc ac:/import.rsc

upload hangs at 100%. If i interrupt it and try to import file it fails with

bad command name 8 (line 1 column 1)

When I download uploaded file back to PC it has 1 additional line at the beginning:

8 file.rsc

Also some lines near end of file are missing

I can scp a rsc file back and forth just fine.

Is there enough disk space on your RB? Lack of disk space would explain missing tail lines. Not the extra head line though …

It seems to be caused by fish shell for whatever reason. When using plain bash, scp to MikroTik works fine