Sponsored Content
Top Forums Shell Programming and Scripting Get specific information from output Post 303043108 by RudiC on Saturday 18th of January 2020 09:11:54 AM
Old 01-18-2020
Although Peasant's proposal delivers the desired output, it doesn't check the XPIC status but, if disabled, relies upon the missing Autorestore entry and silently discards the XPIC status.


Try (with a disabled slot 3 XPIC)
Code:
awk '
/Slot/                  {slot = $2
                        }
/XPIC/                  {Xstatus = $2
                        }
Xstatus == "Enabled" &&
$1 == "Autorestore" &&
$2 != "Enabled"         { print "rl", slot, "xpicrecovery 5 5"
                        }
' file
rl 2 xpicrecovery 5 5
rl 5 xpicrecovery 5 5

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to perform Grep on many Gzip files, Searching for Specific information

Hello, I am wondering if you can assist with my question and ask kindly for this. I have a number of files that are listed as file1.gz through file100.gz. I am trying to perform a grep on the files and find a specific date that only resides within within one of the files. There are... (3 Replies)
Discussion started by: legharb
3 Replies

2. UNIX for Advanced & Expert Users

using txr to extract information from output

am using txr command (txr 1097) on a process that generates the following output. Im trying to extract the 13th field from the highlighted string. it is delimited by '?'. The 13th field corresponds to the '0' (in bold). can you let me know how I can extract the 13 th field please? ... (1 Reply)
Discussion started by: pazman
1 Replies

3. Shell Programming and Scripting

Using txr to extract information from output

am using txr command (txr 1097) on a process that generates the following output. Im trying to extract the 13th field from the highlighted string. it is delimited by '?'. The 13th field corresponds to the '0' (in bold). can you let me know how I can extract the 13 th field please? ... (1 Reply)
Discussion started by: pazman
1 Replies

4. UNIX and Linux Applications

Reflection Macro: Use Current Date Information in specific field of report

Hi Everyone, New to the forum, and have my first question. I have the following Macro currently being used within Telnet to run a report for the date being entered. However, now I need the Macro to input the day after today to the the day after today. Example: If today is May 9, 2012 - the... (0 Replies)
Discussion started by: CipherEffect
0 Replies

5. Shell Programming and Scripting

get specific information from text file or command output

Hello, I would need some help, :wall: on a linux script, I am not sure how can I separate some text file, Text file contains something similar to this: share "userhome_e" "/fs1_100g/FILE58/userhome" umask=022 maxusr=4294967295 netbios=FILE58 share "bu share"... (3 Replies)
Discussion started by: nakaedu
3 Replies

6. Shell Programming and Scripting

[Solved] How can I pull specific information from PS?

I need to grab information from the output of the ps command. For each line of ps output that contains _progres -b I need to get the word that follows -p. The "-p" can be anywhere after "_progres -b". Using grep to select the correct lines is no problem (e.g. ps -ef|grep "_progres \-b|grep -v... (3 Replies)
Discussion started by: Papa Lee
3 Replies

7. Shell Programming and Scripting

Pull out information from output logs

My scenario is as follows. 1. I have a reference file with the IP addresses and names $ cat ref.list 10.11.xxx.xxx AA 10.12.xxx.xxx BB 10.13.xxx.xxx CC 10.14.xxx.xxx DD 2. A script runs and gets me one of the IP addresses and puts it in a separate file, for e.g... (2 Replies)
Discussion started by: Nagesh_1985
2 Replies

8. Shell Programming and Scripting

How to extract specific information?

hi, i have a file A like this: ******************* No 2823 ******************** contig15205- G383C4U02H4G80+ is in contig15205- G383C4U02HGLXM- is in contig15205- G383C4U01C3HIZ+ is in contig15205- ... (3 Replies)
Discussion started by: the_simpsons
3 Replies

9. Shell Programming and Scripting

Extract Specific Information from a particular field

Hi, I am trying to extract a specific information from a file which contains more than 200 million records. Attached the input file for your reference. My file contains information below ... (4 Replies)
Discussion started by: rramkrishnas
4 Replies

10. Shell Programming and Scripting

Missing information in output file

Gents, Using the following code i am able to output the information i need, but some of the strings are not complete due to the separator : used.. Kindly can u help me to get all string after the first : Example in the output file column 16 i should get 17/11/25 03:43:51:732000 but i... (8 Replies)
Discussion started by: jiam912
8 Replies
mc(1M)																	    mc(1M)

NAME
mc - media changer manipulation utility SYNOPSIS
device] num] src_element_type dest_element_type] device] element_type] device] drive_number] element_type] device] DESCRIPTION
The utility provides users with a command-line interface to send media manipulation commands to an autoloader or media changer device. It takes "element types" as arguments to most of the options. The valid element types (element_types) are: Specifies a Data Transfer (DT) element. Specifies an Import/Export (IE) element. Specifies a Medium Transport (MT) element. Specifies a Storage (ST) element. An example of a Data Transfer element is the embedded tape drive(s) of the autoloader. An example of an Import/Export element is the slot(s) by which an item of the media may be inserted or removed from the autoloader. An example of a Medium Transport element is the ro- botic picker assembly of the autoloader. An example of a Storage element is the media slot(s) of the autoloader. Please see examples below for usage. Options recognizes the following options and arguments: Prints the SCSI bus address of the drive slot specified by num. Issue a Reserve(1) or Release(0) SCSI command to the device. Determines whether a move from source to destination is valid. Uses device capabilities mode page and will return TRUE or FALSE. There should be no spaces in the source and destination element type values. For example, specifies a Data Transfer element as the source and a Storage element as the destination. Prints out the number of elements of element type. See element types above. Multiple types can be specified. For example, specifies all the valid element types. Prints out usage description. Allow or prevent media removal. Prints the serial number of the drive in the slot specified by num (if information is available). Specifies the pass-through device file to the library device. If the environment variable is set then the option may be omitted. Prints out Vendor ID, Product ID and Product Rev standard inquiry information. Prints out the status (FULL/EMPTY/NONE) of element slots of element type(s). See element types above. If barcode information is supported by the device, this will be appended to the status. Multiple types can be specified. For example, specifies all the valid element types. Specifies the element type and slot number (num) for the move medium source. There should be no space between the element type and the slot number. For example, specifies a Storage element in slot number 1. This option cannot be specified more than twice per invocation. Specifies the element type and slot number for the move medium destination. There should be no space between the element type and the slot number. For example, specifies a Data Transfer element in slot number 3. This option cannot be specified more than twice per invocation. RETURN VALUE
returns 0 upon successful completion and -1 otherwise. DIAGNOSTICS
The above error message could be a result of the command that was used to move media to an embedded drive that is already full. If the LIBRARY environment variable is not set and no other device file is specified, then the above error message will be printed. EXAMPLES
Using a DDS-2 autoloader with a six-cartridge magazine as an example: To see the status of the autoloader's Data Transfer and Storage element types: The following shows an example of output from the above command. The output indicates that there is an item of media in slot 2 (ST_slot_2), an item of media in the embedded drive (DT_slot_1), and all the other slots are empty. To move media from an embedded drive to slot 5 and then move media from slot 2 to an embedded drive: To check if a move from a Data Transfer element to a Storage element is possible: The following shows an example of output from the above command. The output indicates that moves from Data Transfer element types to Stor- age element types are valid. WARNINGS
Note for all HP DDS autoloaders: After the command has been used for the first time, the autoloader will enter into random mode. Once in random mode, all front panel button features are disabled except for the Eject Button. To go back to stacker mode, the magazine must be ejected and then reinserted. Note for some autoloaders or libraries: The media must be unloaded using the command prior to using the command. DEPENDENCIES
The command supports all HP-supported devices that comply with the SCSI-2 Medium Changer command specification. Either the or passthrough driver must be configured. See scsi_tape(7) and scsi_ctl(7). AUTHOR
was developed by Hewlett-Packard. SEE ALSO
mt(1), scsi(7), scsi_tape(7), scsi_ctl(7). mc(1M)
All times are GMT -4. The time now is 01:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy