11
rated 0 times
[
11]
[
0]
/ answers: 1 / hits: 22430
/ 1 Year ago, sat, may 27, 2023, 2:33:55
I have a file which consists of a URL. I'm trying to get the URL from that file using a shell script.
In the file, the URL is like this:
('URL', 'http://url.com');
I tried to use the following:
cat file.php | grep 'URL' | awk '{ print $2 }'
It gives the output as:
'http://url.com');
But I need to get only url.com
in a variable inside the shell script. How can I accomplish this?
More From » bash