Can someone please help me with how to extract the last word on a line to a new file? I have a list of names like:
Ms. Nell D. Bullock
Mrs. Sherrie M Avent
LINDA ANNETTE RUSSELL
Mr. Jerome R. Harris
Pandora Tyndall
I want the new file to look like this:
Bullock
Avent
RUSSELL
Harris... (10 Replies)
Greetings.
I am struggling with a shell script to make my life simpler, with a number of practical ways in which it could be used. I want to take a standard text file, and pull the 'n'th word from each line such as the first word from a text file.
I'm struggling to see how each line can be... (5 Replies)
Hi ,
i have a text file that contain a story
How do i extract the out all the sentences that contain the word Mon. in C++
I only want to show those sentences that contain the word mon
eg.
Monkey on a tree.
Rabbit jumping around the tree.
I am very rich, I have lots of money.
Today... (1 Reply)
Hello Friends,
I have a txt file which has data like this
TNS Ping Utility for Solaris: Version 10.2.0.3.0 - Production on 23-MAR-2010 15:38:42
Copyright (c) 1997, 2006, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to... (7 Replies)
FOLKS ,
i have a text file that is generated automatically of an another korn shell script, i want to bring in the fifth line of the text file in to my korn shell script and look for a particular word in the line . Can you all share some thoughts on this one.
thanks...
Venu (3 Replies)
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)
Hello, I need some help extracting the number after the RBA e.g 15911688 from the below block of text (e.g: grep RBA |sed .......). The code should be valid for blocks if text generated at different times as well and not for the below text only.
... (2 Replies)
Hi everyone,
I'm a perl newbie and need your help to extract a word inside the list of files with same pattern.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:mycode xmlns:ns2="http://www.abcd.com/pqrs/acfSchema-2007a.xsd">
<id>10</id>
<name>PaymentServices</name>
... (7 Replies)
I have a file which I am reading and then I need to extract a particualr word and if it matches the line.
2015-01-22 07:30:17,814000 +0900 /INFO: - <ns2:virtualServerid="PH11PK" />
Means if the line contain Virtual server I need to extract the id .
Code I wrote#!/usr/bin/perl
... (19 Replies)
Hi Everyone,
Need help in extracting the hostname from the below output.
Expected output:
DS-TESTB-GDS-1.TEST.ABC.COM
DS-TESTB-GDS-2.TEST.ABC.COM
....
...
/tmp $ cat -n /tmp/patchreport
1 /usr/bin/perl /admin/bin/patch/applyPatches.pl --apply_patches... (4 Replies)
Discussion started by: thiyagoo
4 Replies
LEARN ABOUT PHP
phardata.extractto
PHARDATA.EXTRACTTO(3) 1 PHARDATA.EXTRACTTO(3)PharData::extractTo - Extract the contents of a tar/zip archive to a directory
SYNOPSIS
bool PharData::extractTo (string $pathto, [string|array $files], [bool $overwrite = false])
DESCRIPTION
Extract all files within a tar/zip archive to disk. Extracted files and directories preserve permissions as stored in the archive. The
optional parameters allow optional control over which files are extracted, and whether existing files on disk can be overwritten. The sec-
ond parameter files can be either the name of a file or directory to extract, or an array of names of files and directories to extract. By
default, this method will not overwrite existing files, the third parameter can be set to true to enable overwriting of files. This method
is similar to ZipArchive.extractTo(3).
PARAMETERS
o $pathto
- Path to extract the given files to
o $files
- The name of a file or directory to extract, or an array of files/directories to extract
o $overwrite
- Set to TRUE to enable overwriting existing files
RETURN VALUES
returns TRUE on success, but it is better to check for thrown exception, and assume success if none is thrown.
ERRORS /EXCEPTIONS
Throws PharException if errors occur while flushing changes to disk.
EXAMPLES
Example #1
A PharData.extractTo(3) example
<?php
try {
$phar = new PharData('myphar.tar');
$phar->extractTo('/full/path'); // extract all files
$phar->extractTo('/another/path', 'file.txt'); // extract only file.txt
$phar->extractTo('/this/path',
array('file1.txt', 'file2.txt')); // extract 2 files only
$phar->extractTo('/third/path', null, true); // extract all files, and overwrite
} catch (Exception $e) {
// handle errors
}
?>
SEE ALSO Phar.extractTo(3).
PHP Documentation Group PHARDATA.EXTRACTTO(3)