Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Extract a portion of string from each line in Linux Post 303017636 by rkakitapalli on Saturday 19th of May 2018 12:32:39 PM
Old 05-19-2018
This is not the homework/Assignment. This is the backend data from the cloudera manager scheduler(BDR). The first field is the BDR id and the record consists of several other setting but we are concentrating on the BDR id and the destination path. We also changed the paths in compliance with security.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to extract a portion of a string from the whole string

How to extract a portion of a string from a full string using unix. For example: Say source string is = "req92374923.log" I want only the numeric portion of the string say "92374923" how to do that in Unix. (2 Replies)
Discussion started by: ds_sastry
2 Replies

2. Shell Programming and Scripting

extract a portion of log file

hello, I want to grep the log file according to time and get the portion of log from one particular time to other. I can grep for individual lines by time but how should I print lines continuously from given start time till end till given end time. Appreciate your ideas, Thanks chandra (8 Replies)
Discussion started by: chandra004
8 Replies

3. Shell Programming and Scripting

extract date portion from file

Hi, I have a file where there is a date field (single line variable length file) how to extract just the date portion from it the position of date field may vary anywhere in the line but will always have the format mm-dd-yyyy for eg . xxxxxxxxxxxxxxx09-10-2006xxxxxxxxxxxxxxxxxxxx (5 Replies)
Discussion started by: misenkiser
5 Replies

4. Shell Programming and Scripting

how to extract a string value from the given line

Hi I have an input as follows: param1:value1|param2:value2|param3:value3|param4:value4|param5:value5 where, "|" and ":" are delimiters Now suppose, I want to extract the value corresponding to "param4", i.e. "value4" in this case. In case we use awk, I want to use the value in shell... (1 Reply)
Discussion started by: gaurav_1711
1 Replies

5. Shell Programming and Scripting

extract string portion using sed

Hi All I have 3 files as listed below and highlighted in bold the portions of the filenames I need to extract: TOS_TABIN218_20090323.200903231830 TOS_TABIN219_1_20090323.200903231830 TOS_TABIN219_2_20090323.200903231830 I tried source_tabin_name=`echo $fname | sed 's/_.*//'` but I... (6 Replies)
Discussion started by: santam
6 Replies

6. Shell Programming and Scripting

extract string portion from filename using sed

Hi All, I posted something similar before but I now have a another problem. I have filenames as below TOP_TABIN240_20090323.200903231830 TOP_TABIN235_1_20090323.200903231830 i need to extract the dates as in bold. Using bash v 3.xx Im trying to using the print sed command but... (11 Replies)
Discussion started by: santam
11 Replies

7. Shell Programming and Scripting

How to extract a text portion from a file

Can some one help me with shell script to extract a text block between two known strings. The given input file is as below: Name: abs Some tesxt.... Some tesxt.... Some tesxt.... end of text Name: xyz Some tesxt.... Some tesxt.... Some tesxt.... end of text Name: efg Some... (5 Replies)
Discussion started by: ejazs0
5 Replies

8. Shell Programming and Scripting

Extract a string from a line

Hiee all Can anyone tell me how to extract a string from a given line. STAPISDK_RELEASE_32_BL012_2011_JAN_25.1597 I want to extract BL012 from above. as 102 keeps on changing i want smthing like that it extract BL and 102 extrct by its own. Thankx guyzz (9 Replies)
Discussion started by: abhijtr
9 Replies

9. Shell Programming and Scripting

How to extract portion of a string?

Hi Gurus, Would like to seek some help on how to extract a portion of string from log's output as shown below. Sample of raw data: piece handle=/test123/disk_dump/test123/df0_cntrl_PCPFCI20120404_68498 tag=TAG20120404T180035 comment=NONE piece... (13 Replies)
Discussion started by: superHonda123
13 Replies

10. Shell Programming and Scripting

Extract portion of data

Hi Gurus, I need some help in extracting some of these information and massage it into the desired output as shown below. I need to extract the last row with the header in below sample which is usually the most recent date, for example: 2012-06-01 142356 mb 519 -219406 mb 1 ... (9 Replies)
Discussion started by: superHonda123
9 Replies
backend(7)							    Apple Inc.								backend(7)

NAME
backend - cups backend transmission interfaces SYNOPSIS
backend backend job user title num-copies options [ filename ] DESCRIPTION
Backends are a special type of filter(7) which is used to send print data to and discover different devices on the system. Like filters, backends must be capable of reading from a filename on the command-line or from the standard input, copying the standard input to a temporary file as required by the physical interface. The command name (argv[0]) is set to the device URI of the destination printer. Starting with CUPS 1.1.22, any authentication information in argv[0] is removed, so backend developers are urged to use the DEVICE_URI environment variable whenever authentication information is required. The CUPS API includes a cupsBackendDeviceURI function for retrieving the correct device URI. Back-channel data from the device should be relayed to the job filters by writing to file descriptor 3. The CUPS API includes the cups- BackChannelWrite function for this purpose. DEVICE DISCOVERY
When run with no arguments, the backend should list the devices and schemes it supports or is advertising to stdout. The output consists of zero or more lines consisting of any of the following forms: device-class scheme "Unknown" "device-info" device-class device-uri "device-make-and-model" "device-info" device-class device-uri "device-make-and-model" "device-info" "device-id" device-class device-uri "device-make-and-model" "device-info" "device-id" "device-location" The device-class field is one of the following values: direct The device-uri refers to a specific direct-access device with no options, such as a parallel, USB, or SCSI device. file The device-uri refers to a file on disk. network The device-uri refers to a networked device and conforms to the general form for network URIs. serial The device-uri refers to a serial device with configurable baud rate and other options. If the device-uri contains a baud value, it represents the maximum baud rate supported by the device. The scheme field provides the URI scheme that is supported by the backend. Backends should use this form only when the backend supports any URI using that scheme. The device-uri field specifies the full URI to use when communicating with the device. The device-make-and-model field specifies the make and model of the device, e.g. "Acme Foojet 2000". If the make and model is not known, you must report "Unknown". The device-info field specifies additional information about the device. Typically this includes the make and model along with the port number or network address, e.g. "Acme Foojet 2000 USB #1". The optional device-id field specifies the IEEE-1284 device ID string for the device, which is used to select a matching driver. The optional device-location field specifies the physical location of the device, which is often used to pre-populate the printer-location attribute when adding a printer. PERMISSIONS
Backends without world execute permissions are run as the root user. Otherwise, the backend is run using the unprivileged user account, typically "lp". EXIT CODES
The following exit codes are defined for backends; C API constants defined in the <cups/backend.h> header file are defined in parenthesis: 0 (CUPS_BACKEND_OK) The print file was successfully transmitted to the device or remote server. 1 (CUPS_BACKEND_FAILED) The print file was not successfully transmitted to the device or remote server. The scheduler will respond to this by canceling the job, retrying the job, or stopping the queue depending on the state of the error-policy attribute. 2 (CUPS_BACKEND_AUTH_REQUIRED) The print file was not successfully transmitted because valid authentication information is required. The scheduler will respond to this by holding the job and adding the authentication-required job-reasons keyword. 3 (CUPS_BACKEND_HOLD) The print file was not successfully transmitted because it cannot be printed at this time. The scheduler will respond to this by hold- ing the job. 4 (CUPS_BACKEND_STOP) The print file was not successfully transmitted because it cannot be printed at this time. The scheduler will respond to this by stop- ping the queue. 5 (CUPS_BACKEND_CANCEL) The print file was not successfully transmitted because one or more attributes are not supported. The scheduler will respond to this by canceling the job. 6 (CUPS_BACKEND_RETRY) The print file was not successfully transmitted because of a temporary issue. The scheduler will retry the job at a future time - other jobs may print before this one. 7 (CUPS_BACKEND_RETRY_CURRENT) The print file was not successfully transmitted because of a temporary issue. The scheduler will retry the job immediately without allowing intervening jobs. All other exit code values are reserved. SEE ALSO
cupsd(8), cupsd.conf(5), filter(7), http://localhost:631/help COPYRIGHT
Copyright 2007-2011 by Apple Inc. 15 April 2011 CUPS backend(7)
All times are GMT -4. The time now is 03:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy