Sponsored Content
Full Discussion: deleting lines
Top Forums Shell Programming and Scripting deleting lines Post 35740 by oombera on Thursday 1st of May 2003 04:54:28 PM
Old 05-01-2003
I understand the script in general now..

From what I see, the part where n deletes the next line should delete all lines until the next $target is found, but it doesn't; however, the second instance of s/${target}// should actually be searching for a blank line instead of $target..
 

10 More Discussions You Might Find Interesting

1. Programming

deleting lines

I am spooling a file from oracle and trying to delete the last line of the spooled file which I am unable to do. Problem is that this file can have multiple records each time and I have no way of knowing how many because the amount can vary. I had an idea of using a while loop to read the... (1 Reply)
Discussion started by: supercbw
1 Replies

2. Shell Programming and Scripting

Deleting lines in a file

How do I delete all the lines after the line containing text ***DISCLOSURES*** . I want to delete this line too. Thank you (2 Replies)
Discussion started by: reachsamir
2 Replies

3. Shell Programming and Scripting

Deleting the similar lines

Dear Friends myself Avinash working in bash shell The problem goes like this I have a file called work.txt assume that first colum=mac address second colum= IP third colum = port number ---------------------------------------- 00:12:23:34 192.168.50.1 2 00:12:23:35 192.168.50.1 5... (2 Replies)
Discussion started by: avi.skynet
2 Replies

4. Shell Programming and Scripting

Deleting processed lines

I have a log file that I am processing. This contains messages from and to a server (requests and responses). The responses to requests may not be in order i.e. we can have a response to a request after several requests are sent, and in some error cases there may not be any response message. ... (2 Replies)
Discussion started by: BootComp
2 Replies

5. UNIX for Advanced & Expert Users

Deleting lines from a file

How I can delete 100 lines anywhere in a file without opening a file and without renaming the file. (11 Replies)
Discussion started by: Nirgude07
11 Replies

6. Shell Programming and Scripting

deleting last n lines from a output

Friends, I am executing this command in solaris sar -d 3 3 | awk 'NR > 2 { if ($1 !~ /,.+/) print }' | egrep -v "nfs|device" . Now i want to delete the last two lines of my output as they are records of average which i don't want. can some one pls give me some idea on how to proceed. (7 Replies)
Discussion started by: achak01
7 Replies

7. Shell Programming and Scripting

Deleting particular lines.

hi all, i have got a scenario in which i need to delete all the lines that ends with file names. e.g. input can be cms/images/services_icons/callback.png cms/cms/images/services_icons/sync.php cms/cms/images/services_icons and output should be cms/cms/images/services_icons ... (13 Replies)
Discussion started by: kashifv
13 Replies

8. Shell Programming and Scripting

deleting lines from file

We have a server that logs transactions to a file. I want to write a script that will delete the first 50 lines of the file daily without renameing the file or moving the file. (8 Replies)
Discussion started by: daveisme
8 Replies

9. Shell Programming and Scripting

deleting lines in ex

Hello, im using ex to manipulate some text. Im trying to delete all the lines except those on which a certain regex can be found. the important part of the script: ex temp << 'HERE' g/regex/p HERE this command prints the lines I want to end up with, but it doesnt delete the others.... (2 Replies)
Discussion started by: drareeg
2 Replies

10. Shell Programming and Scripting

Deleting all lines containing numbers

Hi guys I have a text file in the following format what i would like ot do is iterate through the file deleting the lines containing only numbers. I have googled this and have been unable to find any help ( maybe its my search terms) so if any one an give me a heads up i would... (3 Replies)
Discussion started by: dunryc
3 Replies
tran_tgt_init(9E)						Driver Entry Points						 tran_tgt_init(9E)

NAME
tran_tgt_init - request to initialize HBA resources on behalf of a particular target SYNOPSIS
#include <sys/scsi/scsi.h> void prefixtran_tgt_init(dev_info_t *hba_dip, dev_info_t *tgt_dip, scsi_hba_tran_t *hba_tran, struct scsi_device *sd); INTERFACE LEVEL
Solaris architecture specific (Solaris DDI). PARAMETERS
hba_dip Pointer to a dev_info_t structure, referring to the HBA device instance. tgt_dip Pointer to a dev_info_t structure, referring to the target device instance. hba_tran Pointer to a scsi_hba_tran(9S) structure, consisting of the HBA's transport vectors. sd Pointer to a scsi_device(9S) structure, describing the target. DESCRIPTION
The tran_tgt_init() vector in the scsi_hba_tran(9S) structure may be initialized during the HBA driver's attach(9E) to point to an HBA driver function to be called by the system when an instance of a target device is being created. The tran_tgt_init() vector, if not NULL,is called after the dev_info node structure is created for this target device instance, but before probe(9E) for this instance is called. Before receiving transport requests from the target driver instance, the HBA may perform any initialization required for this par- ticular target during the call of the tran_tgt_init() vector. Note that hba_tran will point to a cloned copy of the scsi_hba_tran_t structure allocated by the HBA driver if the SCSI_HBA_TRAN_CLONE flag was specified in the call to scsi_hba_attach(9F). In this case, the HBA driver may choose to initialize the tran_tgt_private field in the structure pointed to by hba_tran, to point to the data specific to the particular target device instance. RETURN VALUES
tran_tgt_init() must return: DDI_SUCCESS the HBA driver can support the addressed target, and was able to initialize per-target resources. DDI_FAILURE the HBA driver cannot support the addressed target, or was unable to initialize per-target resources. In this event, the initialization of this instance of the target device will not be continued, the target driver's probe(9E) will not be called, and the tgt_dip structure destroyed. SEE ALSO
attach(9E), probe(9E), tran_tgt_free(9E), tran_tgt_probe(9E), scsi_hba_attach_setup(9F), scsi_device(9S), scsi_hba_tran(9S) Writing Device Drivers SunOS 5.10 1 Nov 1993 tran_tgt_init(9E)
All times are GMT -4. The time now is 02:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy