Search Results

Search: Posts Made By: DrSammyD
4,431
Posted By DrSammyD
Array not surviving while loop
So I'm trying to read datafile into an array, with each line representing one variable in the array. I'm successful at first but somehow it keeps getting erased.


i=0
grep '.*' datafile | while...
2,911
Posted By DrSammyD
Right on the money. That was exactly the problem....
Right on the money. That was exactly the problem. I simply copied the contents of the file, created a new one in emacs and pasted it in there, and then renamed it to the original. Then all of a...
2,911
Posted By DrSammyD
Sed $ appending to front, not to the end
I keep trying to append some astrix to the end of a line, but it keeps overwriting at the front of the line.

These are the originals


Fred Fardbarkle:674-843-1385:20 Parak Lane, Duluth, MN...
1,542
Posted By DrSammyD
It's a regular expression ^ means at the...
It's a regular expression

^ means at the beginning of a line in some data
. means Any character
\{42\} means 42 of those any characters

If that . was an A or a B, \{42\} would mean 42 A's or...
4,008
Posted By DrSammyD
I don't know, this is a chapter on grep, so...
I don't know, this is a chapter on grep, so everything has to be done with grep. we are getting to awk and sid in the next chapter. But remember, I don't need the lines with 6 figures, I need the...
4,008
Posted By DrSammyD
Grep line above X condition
1. The problem statement, all variables and given/known data:

I have to grep a data file called datebook.txt. The last information in each line is a salary. I have to grep all the lines which...
Showing results 1 to 6 of 6

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