File Parsing Magic
-
@anthonyh said in File Parsing Magic:
Understood. I need to figure out a way to parse the file so that the process finds "user=" and pulls everything after it until it hits the following ";", then finds "ip=" and pulls everything after it until it hits the following ";"
Yes, which is basically what I did but the cut command can only use a single character delimiter.
-
@scottalanmiller said in File Parsing Magic:
@anthonyh said in File Parsing Magic:
Understood. I need to figure out a way to parse the file so that the process finds "user=" and pulls everything after it until it hits the following ";", then finds "ip=" and pulls everything after it until it hits the following ";"
Yes, which is basically what I did but the cut command can only use a single character delimiter.
Could he pipe it into awk, use the "." as a delimeter and the print all fields preceding each "."?
-
I'm very much a Linux noob, so I don't know what command to use. But I'd just use a regular expression alone or perhaps in combination with some other command to get the desired text here. In Powershell I would use the -match operator and/or the Select-String cmdlet.