I wanted to test filesystem checking on a large XFS filesystem and needed to fill the filesystem. The task was to create files on random with different file size and names placed in different folders. The script I found on the Internet does exactly that #!/bin/bash # Created by Ben Okopnik on Wed Jul 16 […]
cat file| tr ‘A-Z’ ‘a-z’
A bash script to convert everything from upper- to lowercase. “!/bin/bash for n in *; do mv $n `echo $n | tr ‘[:upper:]’ ‘[:lower:]’`; done
tr ‘\r’ ‘\n’ < sourcefile_dos.txt > resultfile_unix.txt An alternative is to use the program hd2u which is a DOS < –> Unix convertor dos2unix -U 2006-12.md5 Converts from DOS to Unix, doing a Unix to DOS use the -D switch.