what's the code for delete everything before [ for every line in a file?
Thank you so much
yoyoyo [hello]
sssss [hello]
asdf [hello]
become:
[hello]
[hello]
[hello]
sed "s/^.*\[/[/" input_file
sed 's/\(.*\)\(\[.*\)/\2/'
This will delete upto the first [ in the line.
sed -e "s/^[^\[]*\[/\[/g" file.txt