Know Shell Script

Sunday, July 14, 2013

split string in bash

here is example using sed command.

echo "my name is;chotelal" | sed -e 's/;/\n/g'
myname is
chotelal


Posted by Ajeet at 2:37 PM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2016 (3)
    • ►  August (3)
  • ▼  2013 (16)
    • ►  November (2)
    • ►  October (1)
    • ►  August (1)
    • ▼  July (5)
      • Operators in Bash script
      • Splitting string using cut command in Linux
      • split string in bash
      • File test option in shell
      • how to find files with specific date range
    • ►  June (2)
    • ►  May (1)
    • ►  March (3)
    • ►  February (1)
  • ►  2012 (5)
    • ►  November (1)
    • ►  October (4)

About Me

My photo
Ajeet
View my complete profile
Simple theme. Powered by Blogger.