Well, I have the following file:
12721 2 2 2 1 1 2 1 2 1 1 1 2 2 1 1 2 1 2 1 1 2
12722 2 2 2 1 1 2 1 2 1 1 1 2 2 1 1 2 1 2 1 1 2
12734 2 2 2 1 1 2 1 2 1 1 1 2 2 1 1 2 1 2 1 1 2
12753 2 2 2 1 1 2 1 2 1 1 1 2 2 1 1 2 1 2 1 1 2
12756 2 2 2 1 1 2 1 2 1 1 1 2 2 1 1 2 1 2 1 1 2
I need to remove the spaces starting from the second column, so that my file looks like this:
12721 222112121112211212112
12722 222112121112211212112
12734 222112121112211212112
12753 222112121112211212112
12756 222112121112211212112
I tried this command to replace:
sed '1,$s/ //g' snpdata > snpdata1
it did not work and I got it:
12721222112121112211212112
12722222112121112211212112
12734222112121112211212112
12753222112121112211212112
12756222112121112211212112
any suggestions to replace starting from the second column?
Note: my original dataset has thousands of columns and rows.