how do I chop of characters at the end of a line...

Pàgina inicial
Adjunts:
Missatge com a correu electrònic
+ (text/plain)
Delete this message
Reply to this message
Autor: Kevin Brown
Data:  
Assumpte: how do I chop of characters at the end of a line...
> I want to take a variable say a="string.txt" and chop off the last 4
> characters so I can make variable b equal to just "string"


What programming language?

You can use cut in a shell script, or treat it as an array and shorten the array
length by 4 spots, etc...