I have used the following command
sqlcmd -E -S
The above command produced only 512 characters. After further investigation, I found out that this has been reported as a feedback on Microsoft connect sqlcmd 512 characters still not registered as a bug by Microsoft. I hope this is going to be fixed soon.