1
So I am attempting to overwrite using a pipe:
//reads contents of file| turns lowercase to uppercase | changes $ to # |
// then attempts to overwrite original file with new version
cat cutTester.txt|tr '[a-z]' '[A-Z]'|tr '$' '#' >cutTester.txt
but when I do this it just wipes the file. This is the contents of the file
$first$second$third$fourth
$fifth$sixth$seventh$eighth
$ninth$tenth$eleventh$twelveth
$thirteenth$fourthteenth$fifthteenth$sixthteenth
$seventeenth$eightteenth$nineteenth$twenty
$twenty-one$twenty-two$twenty-three$twenty-four
1
See Warning regarding ‘‘>’’.
– Scott – 2017-04-15T02:22:52.113