buddy123
buddy123

Reputation: 6327

Removing character from 'type' in cmd batch file

I have a text file and I wish to remove its first character with command line batch file. I cant read the content of the file to a var with set /p var= <myfile because its a big file ( > 8KB) I just need the first character, if its a whitespace, to remove it.

Upvotes: 1

Views: 246

Answers (1)

foxidrive
foxidrive

Reputation: 41287

Using GnuSed:

@echo off
sed "1s/^[ \t]//" file.txt >file2.txt

Thanks to Endoro for the simplification.

Upvotes: 2

Related Questions