Search Results

Search: Posts Made By: raichlea
6,352
Posted By raichlea
Thanks again, you've really been helpful and I am...
Thanks again, you've really been helpful and I am finally done with this project.

Incidentally, this article was really helpful:

HANDY ONE-LINERS FOR SED...
6,352
Posted By raichlea
duh.... the answer was to run the following:...
duh....

the answer was to run the following:
sed -n '/^A/!p' list > list2
sed '/^$/d' list2 > list4

Thanks!
6,352
Posted By raichlea
sed -n '/^A/p' list > file selects all the...
sed -n '/^A/p' list > file
selects all the lines I don't want. Can I negate it and select all the others?
6,352
Posted By raichlea
alternatively, I could select all lines that...
alternatively, I could select all lines that DON'T begin with that string but I'm not sure how to do that yet. I'm trying to figure it out, but any help would be appreciated.
6,352
Posted By raichlea
Ok... so this deletes all instances of "A/A/" but...
Ok... so this deletes all instances of "A/A/" but I actually want to cut any lines that being with "A/A/". Many of these are in the format A/A/B/C and A/A/D/E and this leaves me with a bunch of...
6,352
Posted By raichlea
Thank you very much for all your help and for not...
Thank you very much for all your help and for not telling me to learn perl :)
6,352
Posted By raichlea
sigh... still working on this. There are...
sigh... still working on this.

There are 2 more things I have to figure out. .

How do you indicate all lines beginning with specific file paths for example:

A/A/*

sed -e 's/"A/A/*"/...
6,352
Posted By raichlea
got it, thanks. The answer was to use cut...
got it, thanks.

The answer was to use cut as such:

cut --delimiter='%' -f 1 list3 > name
cut --delimiter='@' -f 2 list3 > location

Thanks for the help!
6,352
Posted By raichlea
I changed the command to read sed -e 's/ - / %...
I changed the command to read
sed -e 's/ - / % /' list > list3

and now I have a separate symbol to break up the data. Is there an expression to say cut all data up to the % and write to a file?
6,352
Posted By raichlea
well that removed all the hyphens between name...
well that removed all the hyphens between name and location WITHOUT removing the words that needed to be hyphenated, so that's a start, but it still doesn't allow me to separate the data on either...
6,352
Posted By raichlea
Help with grep and regex
Hi all,

I'm a beginner with linux, regex, grep, etc
I am trying to get data out of a file that has about 13,000 lines in this format

name - location

I want to grep all the names out to one...
Showing results 1 to 11 of 11

 
All times are GMT -4. The time now is 02:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy