Bash script to edit text file
I have a text file that is too big to edit by hand and I want to create a simple little script that deletes part of the entry and leaves the rest.
For example, every line has something like this: Code:
http://user:pass@whatever.whatever.com/ Code:
user:pass |
This is not very smart, but might do the trick:
Code:
#!/bin/sh * Make it executable with chmod +x url-extract.sh * Give your filename as the first argument: url-extract.sh filename_that_is_to_big_to_edit_by_hand.txt and it returns only user:pass as you wanted |
Ok, I shall give it a shot.
Sweet, it worked. |
All times are GMT -5. The time now is 03:17 PM. |