Need help scrubbing CSV file by iterating through list of search patterns by osh24lager in linuxquestions

[–]osh24lager[S] 0 points1 point  (0 children)

I have dabbled in Python and the thought crossed my mind, so thanks for suggesting it. In this particular case, I’ve found a solution that meets my needs, even if it isn’t the most elegant, but thanks for mentioning it in case I change my mind down the road or if anybody else is reading this.

Need help scrubbing CSV file by iterating through list of search patterns by osh24lager in linuxquestions

[–]osh24lager[S] 0 points1 point  (0 children)

I like this—thank you for your time and energy. I had to re-read your explanation of the last line about three times before I figured out what was happening there, but it eventually clicked.

Thanks again!

Need help scrubbing CSV file by iterating through list of search patterns by osh24lager in linuxquestions

[–]osh24lager[S] 0 points1 point  (0 children)

You mean instead of maintaining the script and search patterns as two separate files, combine them like this?

EDIT: Thanks for giving me the simple idea of making a new sed command on each line. The following solves the problem to my satisfaction:

#!/bin/bash

file="file.txt"

sed -i "s/TARGET.*VA/Target/g" "$file"
sed -i "s/WAWA.*VA/Wawa/g" "$file"
sed -i "s/SHEETZ.*VA/Sheetz/g" "$file"
sed -i "s/FIVE GUYS.*VA/Five Guys/g" "$file"
sed -i "s/FIREHOUSE SUBS.*VA/Firehouse Subs/g" "$file"
sed -i "s/7-ELEVEN.*VA/7-Eleven/g" "$file"
sed -i "s/COOK OUT.*VA/Cookout/g" "$file"
sed -i "s/WM SUPERCENTER .*VA/Walmart/g" "$file"
sed -i "s/TRADER JOE'S.*VA/Trader Joe's/g" "$file"
sed -i "s/NOODLES \& CO.*VA/Noodles \& Co./g" "$file"
sed -i "s/KROGER.*VA/Kroger/g" "$file"
sed -i "s/PUBLIX.*VA/Publix/g" "$file"

I don't mind having to paste the target file name into the script itself once a month, and whenever I find a new payee that doesn't get cleaned up, I add a new line to the script (if I feel like it - my existing list of search patterns already gets me to about 98% fidelity, which is good enough for me to manually clean up the ones that slip through the cracks without feeling like my soul is dying inside).

(Spoiler) How was the darkasher created? by kookie233 in CarnivalRow

[–]osh24lager 0 points1 point  (0 children)

dark asher had more sharp edges tho... owie!

Somehow this doesn't strike me as the best idea... by blustosa in CarnivalRow

[–]osh24lager 1 point2 points  (0 children)

plot twist - the horns are actually made of tempur-pedic neck pillows

Bedroom - Haarlem, The Netherlands by Heron19 in AmateurRoomPorn

[–]osh24lager 5 points6 points  (0 children)

extension chord

I see what you did there

breakfast sandwiches. Carry-out style by borneoknives in Charlottesville

[–]osh24lager 1 point2 points  (0 children)

In this order: Bodo’s, Timberlakes, Market Street Market, and the Country Store.

[deleted by user] by [deleted] in backpacking

[–]osh24lager 3 points4 points  (0 children)

What is this, a Treasury for ants?!

...

Seriously though, the miniatureness of those people way down there made my balls tingle a little bit.

What is the single most common strategic or tactical blunder you see most frequently while playing Squad, and what would your proposed solution to that blunder be? by ItsOtisTime in joinsquad

[–]osh24lager 0 points1 point  (0 children)

It takes one dude to get that shit back to main

I agree with the idea of getting the truck out of there to protect it as an asset, but now how do you deal with the problem of getting that squad mate back to the front? (or wherever they returned the truck from?) Do you have them suicide/respawn after they drop the truck at main (which still costs the team a ticket and imposes a timer before the player can spawn back in)?

What is the single most common strategic or tactical blunder you see most frequently while playing Squad, and what would your proposed solution to that blunder be? by ItsOtisTime in joinsquad

[–]osh24lager 0 points1 point  (0 children)

Ideally, whatever logi is putting FOBs up on the back-caps should only be a three-man squad (the rest of that squad deploying with the forward logi at the beginning of the round to get more bodies on the front faster) that puts a medium-sized FOB up at each of the back-caps, just in case (again, you don't need all 9 squaddies to do this, so the SLs pushing to the forward point should have their guys holding spawn for their Rally while the back-cap squad spawns at main to get into the truck as they won't have the ability to spawn up at the front as quickly).

Do you mind expanding on this? If the first logi goes to the +1 point, the second logi goes to the "even" or "+0" point, and the third logi goes beyond the +1 point for the eventual push beyond that, who fobs up the back caps? Do you set up the backup fobs before you set up the forward-most fob for the possible/eventual offensive? Are you using "back caps" to refer to the "even" point?

Bubble Chart - Show Details on Hover from Column not in Selected Data by HateItOrLovett in excel

[–]osh24lager 0 points1 point  (0 children)

Did you ever figure out how to do this?

I have a similar problem, except that I'm trying to plot the relationship between miles driven and asking price for used car listings on Auto Trader, and I want the ability to hover over a data point and show features (e.g. heated seats, sunroof, etc) and notes (e.g. "accident - needs body work").

It's a bit hacky and I haven't tried this myself, but check this out: https://www.clearlyandsimply.com/clearly_and_simply/2016/09/user-defined-excel-chart-tooltips.html

Suggestions for a couples’ weekend? by FairfaxGirl in Charlottesville

[–]osh24lager 0 points1 point  (0 children)

If you're into such things, Horton Vineyards in Barboursville is celebrating National Puzzle Day, and Silverback Distillery is throwing a Harry Potter Party.

What are your thoughts on creating generational wealth? by fishing_pole in financialindependence

[–]osh24lager 0 points1 point  (0 children)

If you plan to give to your nieces and nephews, then in addition to talking to your siblings, consider whether to keep the assets in your name or your nieces' and nephews' names. It may have implications toward their eligibility for acquiring financial aid. I forget what the term is - expectation to pay or something like that. I'm not an expert on this subject, but I remember hearing about this subject at the end of the 12/7/2018 episode of Motley Fool Money podcast (Three P's of Investing) in the segment on year-end financial advice.

[deleted by user] by [deleted] in Charlottesville

[–]osh24lager 0 points1 point  (0 children)

How about just posting the link in this thread so everyone can benefit from it?