Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example shell scripts for Linux have CRLF line terminators #25

Open
CBindahouse opened this issue May 5, 2023 · 2 comments
Open

Example shell scripts for Linux have CRLF line terminators #25

CBindahouse opened this issue May 5, 2023 · 2 comments

Comments

@CBindahouse
Copy link

The example shell scripts (e.g. RUN_RV32_fibonacci.sh, RUN_RV64_dhrystone.sh etc) have CRLF line teminators, when they shouldn't. Using dos2unix sorts this out, but it would be best to not have to do this!

@duncangraham-Imperas
Copy link
Contributor

I have just checked the source of these files before they were uploaded and they do not have CRLF line terminators; so I do not know why you are seeing this.
Below I am showing the result of the file and od commands on the shell and batch files that were uploaded.

 github $ file ./imperas-riscv-tests/riscv-ovpsim/examples/fibonacci/RUN_RV32_fibonacci.sh 
./imperas-riscv-tests/riscv-ovpsim/examples/fibonacci/RUN_RV32_fibonacci.sh: Bourne-Again shell script, ASCII text executable
github $ od -c ./imperas-riscv-tests/riscv-ovpsim/examples/fibonacci/RUN_RV32_fibonacci.sh
0000000   #   !   /   b   i   n   /   b   a   s   h  \n  \n   c   d    
<snip>
0000340           "   $   @   "  \n

Only the batch files have this

github $ file ./imperas-riscv-tests/riscv-ovpsim/examples/fibonacci/RUN_RV32_fibonacci.bat 
./imperas-riscv-tests/riscv-ovpsim/examples/fibonacci/RUN_RV32_fibonacci.bat: DOS batch file, ASCII text, with CRLF line terminators
github $ od -c ./imperas-riscv-tests/riscv-ovpsim/examples/fibonacci/RUN_RV32_fibonacci.bat
0000000   @   e   c   h   o       o   f   f  \r  \n  \r  \n   ;   r   e
<snip>
0000440       p   a   u   s   e       )  \r  \n
0000452

@CBindahouse
Copy link
Author

That's strange. I used git clone and downloaded the zip directly from Github and got the same results.

~/imperas-riscv-tests/riscv-ovpsim/examples/fibonacci$ file ./RUN_RV64_fibonacci.sh
./RUN_RV64_fibonacci.sh: Bourne-Again shell script, ASCII text executable, with CRLF line terminators

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants