Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

consider this as a sample of a text file:

|60.05.33.14.61|
|03.22.32.23.44.20.45|
|25.17.03.20.24.05.61|
|60.24.40.35.14.25.16.01.03.61|

How can I delete all the initial "|"characters and not the end ones? (I do this kind of jobs mostly through scripting)

Or consider this:

13.03.33.61|20.24.05.61
13.25.17.03.20.24.05.61|33.13.61
04.42.35.38.23|35.25.24.42.19.25.10.19.61

How can I split these lines into two lines based on "|" position?

share|improve this question
2  
What operating system are you on? Is there anything you've tried yet which didn't work for you? – slhck Mar 25 '13 at 21:31
1  
Deleting the initial | can be done with beginning of line ^ selection. – Hennes Mar 25 '13 at 21:32
up vote 1 down vote accepted

If you are using Windows then it can be done with PowerShell, see example below

$string = "one two three four"
$string.split(" ")

result:
one
two
three
four

Good thing is if you are using Windows 7 or above you already have it available.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .