Find the answer to your Linux question:
Results 1 to 2 of 2
Greetings I would like to know if there is any way I can use the cut command to strip off the first n and the last m characters of a ...
  1. #1
    Just Joined!
    Join Date
    Aug 2008
    Posts
    1

    Doubt about the 'cut' command

    Greetings
    I would like to know if there is any way I can use the cut command to strip off the first n and the last m characters of a line.

    Eg: If i have abcdefgh, is it possible for me to strip off just defg?

  2. #2
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    You mean something like
    echo "abcdefgh" | cut -c 4-7
    ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...