Contents
How do I run a .TXT file in Linux?
Here is an example:
- $cd /tmp.
- $mkdir run.
- $cd run.
- $nano text. txt.
- #!/usr/bin/env perl.
- print “Hello Worldn”;
- ^x to save file.
- $chmod +x text. txt.
How do I convert a file from Windows to Unix?
To convert a Windows file to a UNIX file, enter the following command:
- awk ‘{ sub(“r$”, “”); print }’ windows.txt > unix.txt.
- awk ‘sub(“$”, “r”)’ uniz.txt > windows.txt.
- tr -d ‘1532’ < winfile.txt > unixfile.txt.
1 апр. 2014 г.