Sponsored Content
Top Forums Shell Programming and Scripting perl lwp find word and print next word :) Post 302681781 by Smiling Dragon on Saturday 4th of August 2012 11:18:18 AM
Old 08-04-2012
Code:
while (<>) {  # reads STDIN, put a different handle here if you want
  if (/<div class="sender">(.*)<\/div>$/) {
    print "\"$1\"\n";   # prints with " symbols
    print "$1\n";        # prints without " symbols
  }
}

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

find a word in a file, and change a word beneath it ??

Hi all, I have a file with lines written somewhat like this. aaaa ccc aa linux browse = no xssxw cdcedc dcsdcd csdw police dwed dwd browse = no cdecec (2 Replies)
Discussion started by: vikas027
2 Replies

2. Shell Programming and Scripting

perl (word by word check if a hash key)

Hi, Now i work in a code that 1-get data stored in the database in the form of hash table with a key field which is the " Name" 2-in the same time i open a txt file and loop through it word by word 3- which i have a problem in is that : I need to loop word by word and check if it is a... (0 Replies)
Discussion started by: eng_shimaa
0 Replies

3. UNIX for Dummies Questions & Answers

Script to search for a particular word in files and print the word and path name

Hi, i am new to unix shell scripting and i need a script which would search for a particular word in all the files present in a directory. The output should have the word and file path name. For example: "word" "path name". Thanks for the reply in adv,:) (3 Replies)
Discussion started by: virtual_45
3 Replies

4. Shell Programming and Scripting

extract whole thing in word, leaving behind last word. - perl

Hi, i've a string /u/user/DTE/T_LOGS/20110622_011532_TEST_11_HD_120/HD/TESi T_11_HD_120/hd-12 i need to get string, like /u/user/DTE/T_LOGS/20110622_011532_TEST_11_HD_120/HD the words from HD should get deleted, i need only a string till HD, i dont want to use any built in... (4 Replies)
Discussion started by: asak
4 Replies

5. Shell Programming and Scripting

Find and replace a word in all the files (that contain the word) under a directory

Hi Everyone, I am looking for a simple way for replacing all the files under a directory that use the server "xsgd1234dap" with "xsdr3423pap". For Example: In the Directory, $pwd /home/nick $ grep -l "xsgd1234dap" *.sh | wc -l 119 I have "119" files that are still using... (5 Replies)
Discussion started by: filter
5 Replies

6. Shell Programming and Scripting

find a word and print n lines before and after the match

how to find a word and print n lines before and after the match until a blank line is encounterd (14 Replies)
Discussion started by: chidori
14 Replies

7. UNIX for Dummies Questions & Answers

Find EXACT word in files, just the word: no prefix, no suffix, no 'similar', just the word

I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL. I need the whole word... (6 Replies)
Discussion started by: chicchan
6 Replies

8. Shell Programming and Scripting

[Solved] Search for a word and print the next word

Hi, I am trying to search for a word and print the next word. For example: My text is "<TRANSFORMATION TYPE ="Lookup Procedure">" I am searching for "TYPE" and trying to print ="Lookup Procedure" I have written a code like following: echo $line | nawk... (4 Replies)
Discussion started by: sampoorna
4 Replies

9. Shell Programming and Scripting

Search for a specific word and print only the word from the input file

Hi, I have a sample file as shown below, I am looking for sed or any command which prints the complete word only from the input file. Ex: $ cat "sample.log" I am searching for a word which is present in this file We can do a pattern search using grep but I need to cut only the word which... (1 Reply)
Discussion started by: mohan_kumarcs
1 Replies

10. Shell Programming and Scripting

Find a word and increment the number in the word & save into new files

Hi All, I am looking for a perl/awk/sed command to auto-increment the numbers line in file, P1.tcl: run_build_model sparc_ifu_dec run_drc set_faults -model path_delay -atpg_effectiveness -fault_coverage add_delay_paths P1 set_atpg -abort_limit 1000 run_atpg -ndetects 1000 I would like... (6 Replies)
Discussion started by: jypark22
6 Replies
xkbprint(1X)															      xkbprint(1X)

NAME
xkbprint - print an XKB keyboard description SYNOPSIS
xkbprint [options] source [output_file] OPTIONS
Prints a usage message. Print using the colors specified in the geometry file; by default, xkbprint prints a black-and-white image of the keyboard. Attempt to compute default names for any missing components, such as keys. Show symbols only where they are explicitly bound. Generate an encapsulated PostScript file. Fit the keyboard image on the page (default). Print the keyboard at full size. Print a grid with resmm resolution over the keyboard. Specifies an internal PostScript type 1 font to dump to the specified output file or to font- Name.pfa, if no output file is specified. No keyboard description is printed if an internal font is dumped. Specifies the labels to be printed on keys; legal types are: none, name, code, symbols. Specifies a locale in which KeySyms should be resolved. Generate level 1 PostScript. Generate level 2 PostScript. Print symbols in keyboard groups starting from group. Print symbols starting from shift level level. Generate black-and-white image of keyboard (default). Print num copies. Print the symbols in num keyboard groups. Number of key- board images to print on each page; for EPS files, this specifies the total number of keyboard images to print. Write output to file. Use directory as the root directory; all path names are interpreted relative to directory. Controls use of pictographs instead of keysym names where available. which can be any of all, none, or common(default). Forces synchronization for X requests. Sets warning level (0 for no warning, 10 for all warnings). DESCRIPTION
The xkbprint command generates a printable or encapsulated PostScript description of the XKB keyboard description specified by source. The source can be any compiled keymap (.xkm) file that includes a geometry description or an X display specification. If an output_file is specified, xkbprint writes to it. If no output file is specified, xkbprint creates replaces the extension of the source file with or depending on the requested format. If the source is a non-local X display (e.g.:0), xkbprint appends the appropriate prefix to the display specification, replacing the colon with a dash. For a local display, xkprint uses server-n where n is the number of the display. COPYRIGHT
Copyright 1995, Silicon Graphics Computer Systems and X Consortium, Inc. See X(1X) for a full statement of rights and permissions. SEE ALSO
X(1X), xkbcomp(1X) AUTHOR
Erik Fortune, Silicon Graphics xkbprint(1X)
All times are GMT -4. The time now is 02:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy