Search Results

Search: Posts Made By: crownedzero
27,429
Posted By crownedzero
And that's the piece I've been missing, sorry for...
And that's the piece I've been missing, sorry for being such a pain :D
27,429
Posted By crownedzero
It displays correctly but does not update the file
It displays correctly but does not update the file
27,429
Posted By crownedzero
Still no luck. ex record in file: ...
Still no luck.

ex record in file:
2005:Suzuki:GS500f:Blue:6500:4000:6500:6500:6500:6500

commands runs but does not update
27,429
Posted By crownedzero
I tried using the exact code above and got an...
I tried using the exact code above and got an error could not find file OFS etc before attempting to modify it to work for my particular case.
awk: cmd. line:1: fatal cannot open file `OFS`: for...
27,429
Posted By crownedzero
awk -F:...
awk -F: '{if($0~bike&&new_mileage-$10>=4000){$10=new_mileage}}1' bike=Suzuki new_mileage=12000 OFS=":" input_file

I could change this to awk -F: 'if{(FNR==linenum){$10=new_mileage}}1'...
27,429
Posted By crownedzero
I have a large number of these not specific to...
I have a large number of these not specific to values, so I was hoping to replace $# rather than specific values.

Also wouldn't the sed replace all the values? Thanks for the -i that might be what...
27,429
Posted By crownedzero
Update the mileage on a bike assume line 4 is: ...
Update the mileage on a bike
assume line 4 is:
2005:Suzuki:GS500f:Blue:6500:6000:6500:6500:6500:7000

I've extracted the 10th field of the 4th line i.e. 7000.
User enters 12000 (new odometer...
27,429
Posted By crownedzero
Replace specific field on specific line sed or awk
I'm trying to update a text file via sed/awk, after a lot of searching I still can't find a code snippet that I can get to work.

Brief overview:
I have user input a line to a variable, I then...
2,254
Posted By crownedzero
Hrrm pretty sure that's what I was typing I...
Hrrm pretty sure that's what I was typing I finally used find for the directory and -exec'd it to another find for the group. Ill have to check when I get home. Thanks for all your help!
2,254
Posted By crownedzero
and if I wanted to exceed 100 i'd just have to...
and if I wanted to exceed 100 i'd just have to add another [0-9]?

---------- Post updated at 03:16 PM ---------- Previous update was at 03:07 PM ----------

For data[1-9][0-9] I get no so file...
2,254
Posted By crownedzero
why wouldn't they? they were all created at the...
why wouldn't they? they were all created at the same time by the same user
2,254
Posted By crownedzero
I created dir www/data1-99 and thru in a bunch of...
I created dir www/data1-99 and thru in a bunch of empty files, the results of that only shows files in the /www/data1/ and ignores the other directories.
2,254
Posted By crownedzero
'Find' newb; looking for feedback
Working with examples from a text I found online not quite getting the results I want. Hoping I could have someone look at them and give me some feedback.

Find is set to display contents of...
Showing results 1 to 13 of 13

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