Sponsored Content
Full Discussion: deleting lines
Top Forums Shell Programming and Scripting deleting lines Post 35746 by oombera on Thursday 1st of May 2003 08:53:36 PM
Old 05-01-2003
Odd that it does something different for all of us! Smilie

ajnabi's code works for me too.. at first I thought you wanted to delete the first line with the word OBJECT on it, then every line after it up to and including the next line with the word OBJECT on it, which is really easy to do but unfortunately isn't what you needed:

sed -e '/OBJECT/,//d' yourFile
 

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
UDISKSCTL(1)							   User Commands						      UDISKSCTL(1)

NAME
udisksctl - The udisks command line tool SYNOPSIS
udisksctl status udisksctl info {--object-path OBJECT | --block-device DEVICE} udisksctl mount {--object-path OBJECT | --block-device DEVICE} [--filesystem-type TYPE] [--options OPTIONS...] [--no-user-interaction] udisksctl unmount {--object-path OBJECT | --block-device DEVICE} [--force] [--no-user-interaction] udisksctl unlock {--object-path OBJECT | --block-device DEVICE} [--no-user-interaction] udisksctl lock {--object-path OBJECT | --block-device DEVICE} [--no-user-interaction] udisksctl loop-setup --file PATH [--read-only] [--offset OFFSET] [--size SIZE] [--no-user-interaction] udisksctl loop-delete {--object-path OBJECT | --block-device DEVICE} [--no-user-interaction] udisksctl smart-simulate --file PATH {--object-path OBJECT | --block-device DEVICE} [--no-user-interaction] udisksctl monitor udisksctl dump udisksctl help DESCRIPTION
udisksctl is a command-line program used to interact with the udisksd(8) daemon process. COMMANDS
status Shows high-level information about disk drives and block devices. info Shows detailed information about OBJECT or DEVICE. mount Mounts a device. The device will be mounted in a subdirectory in the /media hierarchy - upon successful completion, the mount point will be printed to standard output. The device will be mounted with a safe set of default options. You can influence the options passed to the mount(8) command with --options. Note that only safe options are allowed - requests with inherently unsafe options such as suid or dev that would allow the caller to gain additional privileges, are rejected. unmount Unmounts a device. This only works if the device is mounted. The option --force can be used to request that the device is unmounted even if active references exists. unlock Unlocks an encrypted device. The passphrase will be requested from the controlling terminal and upon successful completion, the cleartext device will be printed to standard output. lock Locks a device. This only works if the device is a cleartext device backed by a cryptotext device. loop-setup Sets up a loop device backed by FILE. loop-delete Tears down a loop device. smart-simulate Sets SMART data from the libatasmart blob given by FILE - see /usr/share/doc/libatasmart-devel-VERSION/ for blobs shipped with libatasmart. This is a debugging feature used to check that applications act correctly when a disk is failing. monitor Monitors the daemon for events. dump Prints the current state of the daemon. help Prints help and exit. COMMON OPTIONS
The option --no-user-interaction can be used to request that no interaction (such as the user being presented with an authentication dialog) must occur when checking with polkit(8) whether the caller is authorized to perform the requested action. AUDIENCE
This program does not assume that the caller is the super user - it is intended to be used by unprivileged users and authorizations are checked by the udisks daemon using polkit(8). Additionally, this program is not intended to be used by scripts or other programs - options/commands may change in incompatible ways in the future even in maintenance releases. See the "API STABILITY" section of udisks(8) for more information. BASH COMPLETION
udisksctl ships with a bash completion script to complete commands, objects, block devices and some options. AUTHOR
Written by David Zeuthen <zeuthen@gmail.com> with a lot of help from many others. BUGS
Please send bug reports to either the distribution bug tracker or the upstream bug tracker at http://bugs.freedesktop.org/enter_bug.cgi?product=udisks. SEE ALSO
udisks(8), udisksd(8), umount.udisks2(8), polkit(8) udisks 2.1.2 March 2013 UDISKSCTL(1)
All times are GMT -4. The time now is 12:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy