Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Awk: print all URL addresses between iframe tags without repeating an already printed URL Post 302602851 by striker4o on Tuesday 28th of February 2012 01:56:16 PM
Old 02-28-2012
Quote:
Originally Posted by Scrutinizer
Try:
Code:
awk '/http/' RS=\" infile

That never occurred to me. Thanks, it works very well. However, the output is:

Code:
http://ADDRESS_1/?click=5BBB08\
http://ADDRESS_2/?click=5BBB08\
http://ADDRESS_3/?click=5BBB08\
http://ADDRESS_4/?click=5BBB08\
http://ADDRESS_5/?click=5BBB08\
http://ADDRESS_6/?click=5BBB08\
http://ADDRESS_7/?click=5BBB08\
http://ADDRESS_6/?click=5BBB08\
http://ADDRESS_7/?click=5BBB08\

Now I only need to get rid of the duplicate entries.

I did try sort -u and got what I wanted.

So final:

Code:
awk '/http/' RS=\" infile | sort -u


Last edited by striker4o; 02-28-2012 at 03:03 PM.. Reason: Nevermind, I made it. Thanks for help.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

url calling and parameter passing to url in script

Hi all, I need to write a unix script in which need to call a url. Then need to pass parameters to that url. please help. Regards, gander_ss (1 Reply)
Discussion started by: gander_ss
1 Replies

2. Shell Programming and Scripting

url calling and parameter passing to url in script

Hi all, I need to write a unix script in which need to call a url. Then need to pass parameters to that url. please help. Regards, gander_ss (1 Reply)
Discussion started by: gander_ss
1 Replies

3. UNIX for Dummies Questions & Answers

ReDirecting a URL to another URL - Linux

Hello, I need to redirect an existing URL, how can i do that? There's a current web address to a GUI that I have to redirect to another webaddress. Does anyone know how to do this? This is on Unix boxes Linux. example: https://m45.testing.address.net/host.php make it so the... (3 Replies)
Discussion started by: SkySmart
3 Replies

4. UNIX for Advanced & Expert Users

Need to grab URL and place between <A></A> Tags

my output looks like: <A HREF="http://support.apple.com/kb/HT1629"> </A> <A HREF="http://support.apple.com/kb/HT1200"> </A> <A HREF="http://old.nabble.com/AFP-eating-up-CPU-td19976358.html"> </A> <A HREF="http://jochsner.dyndns.org/scripts/NHR.html"> </A> <A... (3 Replies)
Discussion started by: glev2005
3 Replies

5. Shell Programming and Scripting

how to judge wether a url is valid or not using awk

rt 3ks:confused: (6 Replies)
Discussion started by: rainboisterous
6 Replies

6. Shell Programming and Scripting

Extract URL from RSS Feed in AWK

Hi, I have following data file; <outline title="Matt Cutts" type="rss" version="RSS" xmlUrl="http://www.mattcutts.com/blog/feed/" htmlUrl="http://www.mattcutts.com/blog"/> <outline title="Stone" text="Stone" type="rss" version="RSS" xmlUrl="http://feeds.feedburner.com/STC-Art"... (8 Replies)
Discussion started by: fahdmirza
8 Replies

7. Web Development

Regex to rewrite URL to another URL based on HTTP_HOST?

I am trying to find a way to test some code, but I need to rewrite a specific URL only from a specific HTTP_HOST The call goes out to http://SUB.DOMAIN.COM/showAssignment/7bde10b45efdd7a97629ef2fe01f7303/jsmodule/Nevow.Athena The ID in the middle is always random due to the cookie. I... (5 Replies)
Discussion started by: EXT3FSCK
5 Replies

8. UNIX for Dummies Questions & Answers

URL decoding with awk

The challenge: Decode URL's, i.e. convert %HEX to the corresponding special characters, using only UNIX base utilities, and without having to type out each special character. I have an anonymous C code snippet where the author assigns each hex digit a number from 0 to 16 and then does some... (2 Replies)
Discussion started by: uiop44
2 Replies

9. Shell Programming and Scripting

awk and or sed command to sum the value in repeating tags in a XML

I have a XML in which <Amt Ccy="EUR">3.1</Amt> tag repeats. This is under another tag <Main>. I need to sum all the values of <Amt Ccy=""> (Ccy may vary) coming under <Main> using awk and or sed command. can some help? Sample looks like below <root> <Main> ... (6 Replies)
Discussion started by: bk_12345
6 Replies

10. Shell Programming and Scripting

Reading URL using Mechanize and dump all the contents of the URL to a file

Hello, Am very new to perl , please help me here !! I need help in reading a URL from command line using PERL:: Mechanize and needs all the contents from the URL to get into a file. below is the script which i have written so far , #!/usr/bin/perl use LWP::UserAgent; use... (2 Replies)
Discussion started by: scott_cog
2 Replies
WARMUX(6)							   Games Manual 							 WARMUX(6)

NAME
Warmux - A convivial mass murder game. SYNOPSIS
warmux [-h|--help] [-v|--version] [-p|--play] [-i|--internet] [-s|--server] [-c|--client [ip]] [-d|--debug debug_masks] DESCRIPTION
Have the mascots of your favorite free software battle in the Warmux arena using dynamite, grenades, baseball bat and other weapons ... Exterminate your opponent in a funny 2D toon-style scenery. Each player (2 minimum, on the same PC) controls the team of his choice (tux, gnu, firefox, wilber,...) and must destroy his adversaries using more or less casual weapons. Although a minimum of strategy is required to be victorious, Warmux is pre-eminently a "convivial mass murder" game where, turn by turn, each team attempts to produce maximum damage to their opponents. CONTROLS
* Key left/right: walk to the left / to the right * Key up/down: Aim up/down * Key shift: Smaller aim increment/decrement when used with up or down. Smaller step while walking * Key 'b': ("Backwards") jump * Key enter: ("Horizontal") jump * Key backspace: ("Vertical") jump * Key tab: Switch to next or previous (when Ctrl is pressed too) character * Key 'c': Recenter to active character * Key space: Shoot. Exceptions: the parachute is automatically deployed, and teleportation is made with a mouse click. Warning: The automatic bazooka and air strike first need a target to be selected (select it with a left click) * Mouse right click: Show/hide weapons menu * Mouse left click on the map: Select a target for teleportation, automatic bazooka, or air strike * Mouse left click on a character: Make it active (if it's allowed) * Mouse move next to screen borders: Move the map * Key F1, F2, ... F5: Change weapon in category 1, 2, ... 5 * Key F10: Toggle Fullscreen * Key 'p': Pause the game * Key escape: Leave the game (confirmation necessary) SEE ALSO
Have a look at the official website http://warmux.org On the website, you will find some useful help: * List of weapons: http://warmux.org/wiki/en/weapons.php * List of maps: http://warmux.org/wiki/en/maps.php * How to write your own map: http://warmux.org/wiki/Create_your_own_map.php * List of skins: http://warmux.org/wiki/en/skins.php * Forum: http://www.warmux.org/forum/ AUTHOR
Warmux was written by: - Jean-Christophe DUBERGA <jcduberga@gmx.de> - Laurent DEFERT SIMONNEAU <lodesi2@yahoo.fr> - Lawrence AZZOUG <lawrenceazzoug@wanadoo.fr> - Matthieu FERTRE <matthieu.fertre@free.fr> - Renaud LOTTIAUX <renaud.lottiaux@free.fr> - Victor STINNER <victor.stinner@haypocalc.com> This manual page was originally written by Jean Parpaillon <artefact@altern.org>, for the Debian project (but may be used by others). It is maintained by the Warmux team. October 28, 2007 WARMUX(6)
All times are GMT -4. The time now is 11:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy