View Single Post
  #1   (View Single Post)  
Old 4th September 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
ISO Quartermaster
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 588
Default shell: how to take part of the line...


How can i take part of text out of it....? (can't really express my self)
1) Lets say i want to get last/first 5 characters of text...
2) 3 characters starting from 4th character.....

In basic language there is function mid$(string$, offest%, lenght%)
what would be similar function in sh?

Also how can i determine how long is text line? ( len(string$) in basic)
Reply With Quote