how to restrict length of string present in a line using linux
In bash, you can use the following to limit the string, in this case, from index 0 to index 17.
$ var="this is a another string"
$ echo ${var:0:17}
this is a another
Using awk, by columns :
$ awk '{print $1, $2, $3, $4}' file
or with sed :
sed -r 's@^(\S+\s+\S+\s+\S+\s+\S+).*@\1@' file
or by length using cut :
$ cut -c 1-23 file