I'm not so good in english, and I'm new in this
I need a shell script (.sh file) that can read a line and copy the specific value of the line, for example :
I have test.txt which is containing
If the file is in the format as you have shown:
one: 234234234 two: 23423423423 three: 23453453635 four: 2342342342423
Then you can use the below command easily without the need for a script
cat test.txt | cut -d":" -f2 | sed 's/ //g'
The output would be all the numbers from the file above. If you want to save this result to a file then use the below command.
cat test.txt | cut -d":" -f2 | sed 's/ //g' > result.txt
This will overwrite the file each time with the results.
For first line only you can use something like below
head -n 1 test.txt | cut -d":" -f2 | sed 's/ //g' > result.txt
Hope this helps.