Home > OS >  Shell programming to remove a carriage return and a newline
Shell programming to remove a carriage return and a newline

Time:01-27

The cat result. TXT | while read the line;
Do
Let I +=1;
B=$(echo $line "\ n" | | tr - d tr -d \ "r");
The done.

# # the contents of the shell command line by line programming read a file, will probably content contains carriage return and linefeed
# # remove variables of "\ n" and "\ r", namely remove a carriage return and a newline
  • Related