Cut Command Not Working
Posted: 04 Sep 2015 06:30
I have a fairly simple script that sets a base path, opens a txt file, reads the line, cuts the file into parts based on characters. The same script had been working fine a year ago but for some reason it will not execute now. When I run the following, the command window flashes up and closes. I can't even get a pause, timeout or wait to hold it in order to read results. The script is on Windows 7 pro. I know the path is correct and the file exist, actually it creates the nametemp file as needed but it is always empty.
set bpath="C:\server\htdocs\mydirec\input.txt"
findstr ":" %bpath% | cut -f1 -d ":" > %bpath%\data\nametemp
set bpath="C:\server\htdocs\mydirec\input.txt"
findstr ":" %bpath% | cut -f1 -d ":" > %bpath%\data\nametemp