Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Grep a section from an UNIX file obtaining only part of the data Post 303036992 by Scrutinizer on Friday 19th of July 2019 04:24:58 PM
Old 07-19-2019
Try:
Code:
awk '/Sent/{S[$4]=$8} /rename/{F[$4]=$NF} /End of job/{print $NF, S[$4], F[$4]}' OFS=\; file

Code:
JOB1;SERVER1;/users/file1.dat.001

This User Gave Thanks to Scrutinizer For This Post:
 

10 More Discussions You Might Find Interesting

1. SCO

Looking for guidance in obtaining a job in Unix Administration

I recently took a training through a college, and have obtained the CUSA certification, but I've been looking and don't see any jobs in unix out there! Does anyone know of hidden job markets in the unix administration area, located in the Detroit - Michigan area? (4 Replies)
Discussion started by: pkali290
4 Replies

2. UNIX for Dummies Questions & Answers

grep within certain part of file

Hi, Is it possible to grep only on a certain part of a file? Say I have file in.txt which contains below: 11/16 13:07:19.5436 --- ERROR 123 detected. 11/16 13:08:19.5436 --- Generating a <reading> event 11/16 13:08:19.7784 ---- Sending a <writing> event 11/16 14:08:37.4516 ---... (2 Replies)
Discussion started by: Orbix
2 Replies

3. IP Networking

Obtaining your external IP address using a Unix Utility

Hello, this is my first post on the Unix forums. This is something that's been bothering me for a while, is there any particular UNIX/Linux application that will allow you to see you external IP address? :confused: ( The address beyond your router ) Thank you in advance, I could not find a... (4 Replies)
Discussion started by: inquen
4 Replies

4. Shell Programming and Scripting

grep part of file name

Hi, I have a problem to use grep in my script . If I want to grep the file for example : PTWO9089.txt The code below works . grep ^PONE But, I dont know on how to grep the file like this 9066PTWO.txt I'll try to use this code : grep PTWO^ ,but it doesn't work. For your info, the... (4 Replies)
Discussion started by: badbunny9316
4 Replies

5. UNIX for Dummies Questions & Answers

How to get data only inside polygon created by points which is part of whole data from file?

hiii, Help me out..i have a huge set of data stored in a file.This file has has 2 columns which is latitude & longitude of a region. Now i have a program which asks for the number of points & based on this number it asks the user to enter that latitude & longitude values which are in the same... (7 Replies)
Discussion started by: reva
7 Replies

6. Shell Programming and Scripting

Extract section of file based on word in section

I have a list of Servers in no particular order as follows: virtualMachines="IIBSBS IIBVICDMS01 IIBVICMA01"And I am generating some output from a pre-existing script that gives me the following (this is a sample output selection). 9/17/2010 8:00:05 PM: Normal backup using VDRBACKUPS... (2 Replies)
Discussion started by: jelloir
2 Replies

7. UNIX for Dummies Questions & Answers

Copying part of a data file into another

Hi, I have a large number of data files each containing simple integers from 1 to around 25000 in ascending order. However, they are not in a specific progression; some numbers are missing in each file. For ex. datfile1 may have the numbers in order 1 2 4 6 7 8 12 ... 24996 24999 while datfile2... (8 Replies)
Discussion started by: latsyrc
8 Replies

8. Shell Programming and Scripting

Grep or print each section of a file on one line with a separator

I can obtain information from itdt inventory command however it display as below, I'd like to print each entity on one line but seperated by : the file is something like and each section ends with Volume Tag Drive Address 256 Drive State ................... Normal ASC/ASCQ... (3 Replies)
Discussion started by: gefa
3 Replies

9. UNIX for Dummies Questions & Answers

Grep a part of a line from a file

Hi, I have a file with thousands of lines as below INSERT INTO T_DIM_CLNT(CLNT_KY,CLNT_OBJ_ID,ISI_CLNT_ID,OPERN_ID,CLNT_NM,PRMRY_SIC_CD,PRMRY_SIC_DSC,RET_AGE_NBR,REC_CRT_TS,REC_DATA_EXTRC_TS,ETL_LOG_KY) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)... (5 Replies)
Discussion started by: sudhakar T
5 Replies

10. Shell Programming and Scripting

How to Grep of by section?

I have a script that outputs this as a file John Smith ---------------- memberOf: example1;sampletest;test memberOf: example2;sampletest;test memberOf: example3;sampletest;test memberOf: example4;sampletest;test A Member of 4 Groups Sally Smith ---------------- memberOf:... (4 Replies)
Discussion started by: ajetangay
4 Replies
Locale::Script(3perl)					 Perl Programmers Reference Guide				     Locale::Script(3perl)

NAME
Locale::Script - standard codes for script identification SYNOPSIS
use Locale::Script; $script = code2script('phnx'); # 'Phoenician' $code = script2code('Phoenician'); # 'Phnx' $code = script2code('Phoenician', LOCALE_CODE_NUMERIC); # 115 @codes = all_script_codes(); @scripts = all_script_names(); DESCRIPTION
The "Locale::Script" module provides access to standards codes used for identifying scripts, such as those defined in ISO 15924. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 15924 four-letter codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying scripts. The ones currently supported are: alpha This is a set of four-letter (capitalized) codes from ISO 15924 such as 'Phnx' for Phoenician. This code set is identified with the symbol "LOCALE_SCRIPT_ALPHA". The Zxxx, Zyyy, and Zzzz codes are not used. This is the default code set. numeric This is a set of three-digit numeric codes from ISO 15924 such as 115 for Phoenician. This code set is identified with the symbol "LOCALE_SCRIPT_NUMERIC". ROUTINES
code2script ( CODE [,CODESET] ) script2code ( NAME [,CODESET] ) script_code2code ( CODE ,CODESET ,CODESET2 ) all_script_codes ( [CODESET] ) all_script_names ( [CODESET] ) Locale::Script::rename_script ( CODE ,NEW_NAME [,CODESET] ) Locale::Script::add_script ( CODE ,NAME [,CODESET] ) Locale::Script::delete_script ( CODE [,CODESET] ) Locale::Script::add_script_alias ( NAME ,NEW_NAME ) Locale::Script::delete_script_alias ( NAME ) Locale::Script::rename_script_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Script::add_script_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Script::delete_script_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes man page. SEE ALSO
Locale::Codes Locale::Constants http://www.unicode.org/iso15924/ Home page for ISO 15924. AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 1997-2001 Canon Research Centre Europe (CRE). Copyright (c) 2001-2010 Neil Bowers Copyright (c) 2010-2011 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2011-09-26 Locale::Script(3perl)
All times are GMT -4. The time now is 10:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy