Sponsored Content
Top Forums Shell Programming and Scripting Grab from the file in one command Post 302390249 by Scott on Wednesday 27th of January 2010 10:09:12 AM
Old 01-27-2010
Hi.

Code:
awk -F "|" 'length($18) > 14 && $18=F' F="$MY_VARIABLE" input_file > new_file

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to Grab the latest file

I have been trying to use the find command to grab the latest file in a directory and move it to another area. I can't seem to get only that file, I end up getting everything for the day. Any ideas? Thank you (1 Reply)
Discussion started by: n9ninchd
1 Replies

2. UNIX for Dummies Questions & Answers

search and grab data from a huge file

folks, In my working directory, there a multiple large files which only contain one line in the file. The line is too long to use "grep", so any help? For example, if I want to find if these files contain a string like "93849", what command I should use? Also, there is oder_id number... (1 Reply)
Discussion started by: ting123
1 Replies

3. Windows & DOS: Issues & Discussions

DOS script to grab the first file in a dir and rename it

:confused: Hello, Is there any way to use the dir command / some DOS Script to select only first file of similar pattern of files in a direcotory and rename it for example, one directory has 5 files abc_1005.txt abc_5256.txt abc_2001.txt abc_2003.txt abc_3006.txt by use script I would... (2 Replies)
Discussion started by: raghav525
2 Replies

4. Shell Programming and Scripting

Help me grab a passage out of this text file?

Hey guys, I need a command that grabs only this part of the .txt file (that is attached), and outputs it to another .txt file with only these contents below. Thanks in advanced brothers: Disk: Local Disk (C:), NTFS Disk Defragmentation Summary Disk Size 230.85 GB Free Space Size... (4 Replies)
Discussion started by: aabbasi
4 Replies

5. Shell Programming and Scripting

Grab 2 pieces of data within a file

I am a newbie and what I have is a captured file of content. I want to be able to grab 2 pieces of data, multiple times and print them to the screen. DataFile owner: locke user: fun data size: 60 location: Anaheim owner: david user: work data size: 80 location: Orange my script... (2 Replies)
Discussion started by: greglocke
2 Replies

6. Shell Programming and Scripting

Grab from file with sed

Hello All I have a file with this type of records: =LDR 01157nas a22003011a 4500 =001 vtls000000013 =003 VRT =005 20111020150800.0 =008 100128c19699999sp\a|||||\||||0\\\||spa| =037 \\$a1327$i090$j090$k03 =039 ... (14 Replies)
Discussion started by: ldiaz2106
14 Replies

7. Shell Programming and Scripting

Grab data within a table in a long log file.

in my file which is a rather long log file it contains many text and tables and there is one table with 15 columns and I am interested to read in the value in column6 and its corresponding value in column2. Trouble is I do not know how to script it as the line number various between different log... (8 Replies)
Discussion started by: piynik
8 Replies

8. Shell Programming and Scripting

How to grab a block of data in a file with repeating pattern?

I need to send email to receipient in each block of data in a file which has the sender address under TO and just send that block of data where it ends as COMPANY. I tried to work this out by getting line numbers of the string HELLO but unable to grab the next block of data to send the next... (5 Replies)
Discussion started by: loggedout
5 Replies

9. Shell Programming and Scripting

Read file, grab ip with fail2ban

Solved with iptables. Many thanks... Hello, Objective: What I would like to accomplish is : - To read file1 line by line and search each word in file2. - To grab corresponding ip addresses found in file2 - To send related ip addresses to fail2ban (not iptables) By this way, when I... (5 Replies)
Discussion started by: baris35
5 Replies

10. Shell Programming and Scripting

awk remove/grab lines from file with pattern from other file

Sorry for the weird title but i have the following problem. We have several files which have between 10000 and about 500000 lines in them. From these files we want to remove lines which contain a pattern which is located in another file (around 20000 lines, all EAN codes). We also want to get... (28 Replies)
Discussion started by: SDohmen
28 Replies
TV_GRAB_FI(1p)						User Contributed Perl Documentation					    TV_GRAB_FI(1p)

NAME
tv_grab_fi - Grab TV listings for Finland SYNOPSIS
tv_grab_fi [--cache <FILE>] [--config-file <FILE>] [--days <N>] [--gui [<OPTION>]] [--offset <N>] [--output <FILE>] [--quiet] tv_grab_fi --capabilities tv_grab_fi --configure [--cache <FILE>] [--config-file <FILE>] [--gui [<OPTION>]] [--quiet] tv_grab_fi --description tv_grab_fi --help|-h|-? tv_grab_fi --list-channels [--cache <FILE>] [--gui [<OPTION>]] [--quiet] tv_grab_fi --version DESCRIPTION
Grab TV listings for several channels available in Finland. The data comes from various sources, e.g. www.telkku.com. The grabber relies on parsing HTML, so it might stop working when the web page layout is changed. You need to run "tv_grab_fi --configure" first to create the channel configuration for your setup. Subsequently runs of "tv_grab_fi" will grab the latest data, process them and produce XML data on the standard output. COMMANDS
NONE Grab mode. --capabilities Show the capabilities this grabber supports. See also <http://wiki.xmltv.org/index.php/XmltvCapabilities>. --configure Generate the configuration file by asking the users which channels to grab. --description Print the description for this grabber. --help|-h|-? Show this help page. --list-channels Fetch all available channels from the various sources and write them to the standard output. --version Show the version of this grabber. GENERIC OPTIONS
--cache FILE File name to cache the fetched HTML data in. This speeds up subsequent runs using the same data. --gui [OPTION] Enable the graphical user interface. If you don't specify OPTION then XMLTV will automatically choose the best available GUI. Allowed values are: Term Terminal output with a progress bar TermNoProgressBar Terminal output without progress bar Tk Tk-based GUI --quiet Suppress any progress messages to the standard output. CONFIGURE MODE OPTIONS
--config-file FILE File name to write the configuration to. Default is $HOME/.xmltv/tv_grab_fi.conf. GRAB MODE OPTIONS
--config-file FILE File name to read the configuration from. Default is $HOME/.xmltv/tv_grab_fi.conf. --days "N" Grab "N" days of TV data. Default is 14 days. --offset "N" Grab TV data starting at "N" days in the future. Default is 0, i.e. today. --output FILE Write the XML data to FILE instead of the standard output. CONFIGURATION FILE SYNTAX
The configuration file is line oriented, each line can contain one command. Empty lines and everything after the "#" comment character is ignored. Supported commands are: channel ID NAME Grab information for this channel. "ID" depends on the source, "NAME" is ignored and forwarded as is to the XMLTV output file. This information can be automatically generated using the grabber in the configuration mode. series description NAME If a programme title matches "NAME" then the first sentence of the description, i.e. everything up to the first period ("."), question mark ("?") or exclamation mark ("!"), is removed from the description and is used as the name of the episode. series title NAME If a programme title contains a colon (":") then the grabber checks if the left-hand side of the colon matches "NAME". If it does then the left-hand side is used as programme title and the right-hand side as the name of the episode. title map "FROM" 'TO' If the programme title starts with the string "FROM" then replace this part with the string "TO". The strings must be enclosed in single quotes ("'") or double quotes ("""). The title mapping occurs before the "series" command processing. title strip parental level At the beginning of 2012 some programme descriptions started to include parental levels at the end of the title, e.g. "(S)". With this command all parental levels will be removed from the titles automatically. This removal occurs before the title mapping. SEE ALSO
xmltv. AUTHORS
Current Stefan Becker "stefan dot becker at nokia dot com" Ville Ahonen "ville dot ahonen at iki dot fi" Retired Matti Airas BUGS
The channels are identified by channel number rather than the RFC2838 form recommended by the XMLTV DTD. perl v5.14.2 2012-06-30 TV_GRAB_FI(1p)
All times are GMT -4. The time now is 12:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy