grep a particular string
Hi all,
lets say i have a file called file.txt which has the following values: Quote:
{+123456789123456789+} {+456789+} {+1234+} PLease advice experts JOhn |
grep is typically not used to edit files---its main purpose is to find things.
What is the rule for your case? I appears (maybe) that you just want to remove text, but leave numbers. You could try: Code:
sed 's/[[:alpha:]]//g' |
Actually I am doing a comparison script,
I have redirect the output of a wdiff command into a file called file.txt, Quote:
{+123456789123456789+} {+456789+} {+1234+} THanks |
You appear to have not read my post!!!
I asked you for the rule to be followed (and I suggested what I thought it might be)---It does not matter where the data comes from---we are just working with the data you showed us. I also told you that grep might not work. But actually, it might: Look at the -o and -v options. But SED is easier----did you try it? |
All times are GMT -5. The time now is 07:37 PM. |