How to replace a character in a specific column in a file?

This is a file that I have

test line 1 (55)
)
test line 2 (45)
)

I would like to change all the parens in position 1 of this file to a );

i only want to check position 1 in every line of the file. I have tried different varations of sed, but cannot seem to be able to limit it to only check in the first position of the file

thans in advance.

 sed 's/^)/);/'  filename > newfile

Does that do what you want?

1 Like