|
Write a script to automatically process a file.
rm -f session.log rm -f link wget ftp://hostname/f:/ddn/session.log egrep '^N[[:digit:]]|^D[1-4]' session.log >>link egrep -c '^N[[:digit:]]|^D[1-4]' session.log >>link egrep -v 'ACT/UP' link>>link ls -l session.log >>link gedit link
As a result, the file name of the downloaded session.log became a strange character, and the link became link? As shown in the figure below.
Subsequent processing of link session.log files will prompt that the corresponding file cannot be found. I searched for a long time and didn't find the corresponding Chinese information. The situation here is that the script is written under windows, and then passed to Linux to run, and the line break under windows is ^M$ The line break under linux is ^M before $linux when running, and it shows strange characters.
|