Sponsored Content
Top Forums Shell Programming and Scripting AWK script to detect webpages from file Post 302406446 by malcomex999 on Tuesday 23rd of March 2010 02:00:15 AM
Old 03-23-2010
Code:
awk '{count[$0]++}END{for(c in count) print c" X"count[c]}' infile

Or...

Code:
sort infile | uniq -c

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Unix script to detect new file entry in directory

Hi All, I want to detect each new file coming / getting created in unix directory. When every new file came to directory, i have to get its details like its size , date and time stamp and store it into another file. Could any one please tell me , how i can achieve that? Thanks. (13 Replies)
Discussion started by: james_1984
13 Replies

2. UNIX for Dummies Questions & Answers

how to detect my script is already running

I have a script which must not be run more than once at any given time. THis script will be scheduled to run every 20 mins as a cron job. In my script can i have logic to say if this script is already running from the previous cron, then exit. How do i go about doing that. If you describe the... (11 Replies)
Discussion started by: rmulchandani
11 Replies

3. Shell Programming and Scripting

AWK script to detect webpages from file

Hi guys I'm very new to unix and I have to create an awk script that detects webpage addresses from a file/webpage and outputs how many times each webpage was detected.e.g. if my file was: (Note: The symbol " was added to stop them being created into links) "www.google.com"... (1 Reply)
Discussion started by: ROFL
1 Replies

4. Shell Programming and Scripting

script to detect a file from inserted usb and puts into a Variable

There is a same named log file that I have on my 2 different android phones. When I plug it into my computer, it appears in the media folder, For example the first android phone: /media/F6BA-0AF5/folder/A.log I want to put that into a variable to be manipulated.... (3 Replies)
Discussion started by: tobenguyen
3 Replies

5. Shell Programming and Scripting

Script to detect dynamic ip change and update to config file

Hi All, I am newbie here and request your assistance. I have a service running on public ip, but since I have a dynamic IP it keeps on changing and every time I need to manually get the new ip and add to the config file and restart the service. This has become bit time consuming. Hence, I... (4 Replies)
Discussion started by: Shaan_Shaan
4 Replies

6. Shell Programming and Scripting

How to detect empty field in awk ?

Hi ! programmers I have a need of detecting empty field in file my file looks like this 40.900|-71.600|1.6|20|1|1961|21.00|3.700||1|US|28035|10029370|31 40.900|-71.600|5.7|20|1|1961|21.00|3.700||1|US|28035|10029370|31 40.900|-71.600|7.8|20|1|1961|21.00|3.700||1|US|28035|10029370|31... (7 Replies)
Discussion started by: Dona Clara
7 Replies

7. Shell Programming and Scripting

Help with detect with regex and move script

Hi all, I am needing some help with a script that will search for a video file by known extensions and then do a pattern search (I'm guessing via regex) and then based on a match of one type of another move the file to an assigned directory. I would like to do this with either a shell script... (7 Replies)
Discussion started by: Simplify
7 Replies

8. Shell Programming and Scripting

How to detect awk and nawk?

I have 10 scripts which use awk/nawk extensively. I have to always change awk to nawk and nawk to awk when i deploy all my scripts to different types of servers as some support nawk while other support awk. Can you propose a solution that without having to tweak my 10 scripts at several... (8 Replies)
Discussion started by: mohtashims
8 Replies

9. Shell Programming and Scripting

awk script to detect specific string in a log file and count it

Hello, can someone guide me on this? I don't know what is the best approach, (awk script, shell script) I am using RedHat Linux version 6.5. There is a third party application deployed on that server. This app by default generates 5 log files and each file is 20MB. These log rollover... (5 Replies)
Discussion started by: ktisbest
5 Replies

10. Shell Programming and Scripting

How to detect url in use in a script?

Hello, I have a small script and it runs from web application in below format: pipe:///path_to_myscript.sh url1 url2 url3 myscript.sh: #!/bin/bash count=0 while do count=$((count+1)) exec 3>&1 ((ffmpeg -i $1 ...... -f mpegts pipe:1 2>/dev/null 1>&3 ) 2>&1 | \ while read LINE; do echo... (9 Replies)
Discussion started by: baris35
9 Replies
GRML2ISO(8)															       GRML2ISO(8)

NAME
grml2iso - create a multiboot grml ISO using grml2usb SYNOPSIS
grml2iso -o <target.iso> <ISO[s]> Important! The grml team does not take responsibility for loss of any data! INTRODUCTION
grml2iso allows you to create a multiboot grml ISO. You can specify two or more grml ISOs and will get one single multiboot ISO as a result. grml2iso requires and uses grml2usb for this task and installs grub2 as bootmanager on the multiboot ISO. OPTIONS
grml2iso supports the environment variables GRML2USB and WRKDIR. GRML2USB specifies the path to the grml2usb script you'd like to use. WRKDIR specifies the work directory for creating the filesystem. The work directory needs at least as much free disk space as the sum of all specified ISOs. -o <target.iso> This option is mandatory and specifies where the resulting multiboot grml ISO should be placed. Note that (to avoid any possible data loss) grml2iso will exit if the specified target.iso exists already. -c <directory> The content of the specified directory will be copied to the resulting multiboot grml ISO. -b <boot params> Use specified default bootoptions as default. -f Force the program to run and overwrite an existing iso image. -r <boot param> Remove specified boot parameter from existing command line. Could be specified multiple times. -p <grml2usb param> Execute grml2usb with the specified parameters. For a list of valid parameters have a look at the grml2usb webpage[1] or the grml2usb manpage -s <URI> Generate a small iso file which downloads the squashfs file from the specified URI. Due to current limitations in busyboxs wget and DNS resolution, an URL can not contain a hostname but an IP only. This is useful if you want to boot systems which support booting iso image from your local system. Besides the iso image this command also copies the squashfs file to the output directory. USAGE EXAMPLES
# grml2iso -o /tmp/grml.iso grml_2009.05.iso grml64_2009.05.iso Create multiboot ISO /tmp/grml.iso with grml_2009.05.iso and grml64_2009.05.iso. # grml2iso -b 'lang=de ssh=passwd' -c /tmp/grml-content -o /srv/grml.iso /srv/grml/grml_2009.10.iso Create a new iso with additional boot parameters and copy the content from /tmp/grml-content to the generated iso image. # grml2iso -r quiet -r vga=791 -o /srv/grml.iso /srv/grml-small_2009.10.iso Create a new iso and remove existing boot parameters quiet and vga=791. # GRML2USB=/srv/git/grml2usb grml2iso -o /srv/grml.iso /srv/grml/grml_2009.05.iso /srv/grml/grml64-medium_2009.05.iso Create multiboot ISO /srv/grml.iso with grml_2009.05.iso and grml64-medium_2009.05.iso using /srv/git/grml2usb as grml2usb script. # WRKDIR=/mnt/test/grml-tmp grml2iso -o /mnt/test/grml.iso grml_2009.05.iso grml64_2009.05.iso Use /mnt/test/grml-tmp as working directory for creating the multiboot ISO /mnt/test/grml.iso with grml_2009.05.iso and grml64_2009.05.iso. # grml2iso -p --skip-addons -o /srv/grml.iso /srv/grml-small_2009.10.iso /srv/grml64-small_2009.10.iso Don't copy the addons from the specified iso images ONLINE RESSOURCES
Check out the grml2usb webpage[1] and the grml2usb git repository[2]. BUGS
Please report feedback, bugreports and wishes to the author. AUTHORS
Michael Prokop <mika@grml.org[3]> and Thorsten Glaser <tg@mirbsd.org[4]> NOTES
1. grml2usb webpage http://grml.org/grml2usb/ 2. grml2usb git repository http://git.grml.org/?p=grml2usb.git 3. mika@grml.org mailto:mika@grml.org 4. tg@mirbsd.org mailto:tg@mirbsd.org 05/28/2012 GRML2ISO(8)
All times are GMT -4. The time now is 09:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy