Script

Forum rules
Before you post please read how to get help
Post Reply
Betan
Level 1
Level 1
Posts: 1
Joined: Thu Jul 09, 2020 5:29 pm

Script

Post by Betan »

Hi.
I'm new on Linux and i try to find a script that can find a specific name of a HAR code.

The script should be execute in terminal and when the script is asking for the saved .HAR file you put in the dir location of it like Desktop/Downloads/Test/noname.HAR

After that you hit Enter and the script should take out that specific name or link and highlight it.

I hope you all understand what i want and mean, and sorry for poor english, i'm swedish =)
User avatar
aaronrv
Level 1
Level 1
Posts: 24
Joined: Wed Jun 10, 2020 3:23 am

Re: Script

Post by aaronrv »

I'm sorry, but I did not understand.
Hey there! My name is Aaron :)

NEWBIE TIP: Make sure to backup all your files to an external drive, and use Timeshift regularly.
Fuzzy
Level 4
Level 4
Posts: 232
Joined: Thu Jul 28, 2011 11:54 am

Re: Script

Post by Fuzzy »

I'm not 100% certain I understand what you're looking for, but would something like this work for you?

Code: Select all

#!/bin/bash
echo -n "Har file location: "
read HARLocation
grep 'url:' "$HARLocation"
(There's no error checking included in the above, and there probably should be - also, there's no loop or catch for a loop/quit - it is just a simple single-run script.)

Fuzzy
Post Reply

Return to “Scripts & Bash”