Sponsored Content
Top Forums Shell Programming and Scripting Delete to eol after pattern with sed Post 302733015 by vgersh99 on Monday 19th of November 2012 01:38:32 PM
Old 11-19-2012
what exactly have you tried and failed?
 

10 More Discussions You Might Find Interesting

1. HP-UX

How to delete specific pattern in a file with SED?

I have one file which is having content as following... 0513468211,,,,20091208,084005,5,,2,3699310, 0206554475,,,,20090327,123634,85,,2,15615533 0206554475,,,,20090327,134431,554,,2,7246177 0103000300,,,,20090523,115501,89,,2,3869929 0736454328,,,,20091208,084005,75,,2,3699546... (7 Replies)
Discussion started by: ganesh.mandlik
7 Replies

2. UNIX for Dummies Questions & Answers

locate a pattern and delete it using sed

if i have a file test and have a number(123)456-7899 how do i delete this without deleting all digits in the file. parentheses isn't necessary. (2 Replies)
Discussion started by: hobiwhenuknowme
2 Replies

3. Shell Programming and Scripting

sed to find pattern and delete line before and after

I have the following file: line1 line2 MATCH line3 line4 I need to find the pattern, "MATCH" and delete the line before and after MATCH. So the result should be line1 MATCH lline4 I have to use sed because it is the only utility that is common across my environments. I... (1 Reply)
Discussion started by: craftereric
1 Replies

4. Shell Programming and Scripting

sed pattern to delete lines containing a pattern, except the first occurance

Hello sed gurus. I am using ksh on Sun and have a file created by concatenating several other files. All files contain header rows. I just need to keep the first occurrence and remove all other header rows. header for file 1111 2222 3333 header for file 1111 2222 3333 header for file... (8 Replies)
Discussion started by: gary_w
8 Replies

5. Shell Programming and Scripting

sed search pattern and delete lines

Hello, i have a question. My problem is that i have a file like: TEST JOHN ADAM MICHAEL SEBASTIAN ANDY i want find for MICHAEL and want delete lines like this: TEST (4 Replies)
Discussion started by: eightball
4 Replies

6. Shell Programming and Scripting

Including EOL in egrep pattern for multiple lines

Hi all I need your help to get a high-performance solution. I am working on a extensive script to automate file restores using the bprestore tool on a Solaris 5.10 server (bash 3.00). I will only paste the needed parts of the script to avoid any confusion. To use the script the user has to... (2 Replies)
Discussion started by: Anonym
2 Replies

7. How to Post in the The UNIX and Linux Forums

Delete to eol after PASS with sed

working on script and saving ftp log before log save want to remove the password password appears after constant "PASS" thanks pp (1 Reply)
Discussion started by: ppaprota
1 Replies

8. Shell Programming and Scripting

Delete a pattern using sed.

I have a string in which i need to match a pattern and then i need to delete that line which contains that matching string. The string is .. This is the given string //abc/def/IC.5.4.3/test/... i need to match //abc I am writing like this sed '/^/\/\abc/d' but it is not giving me... (4 Replies)
Discussion started by: codecatcher
4 Replies

9. Shell Programming and Scripting

Sed. Delete line before and after pattern.

Hi. In need to delete line before and after pattern in file. I came to following commands. Delete line before sed -ni '/pattern/{x;d;};1h;1!{x;p;};${x;p;}' /etc/testfile Delete line after sed -i '/pattern/{N;s/\n.*//;}' /etc/testfile Is it possible to merge it in single command? (3 Replies)
Discussion started by: urello
3 Replies

10. Shell Programming and Scripting

Using sed to delete one regular pattern with conditions

Hi All , I am having a file like this INPUT FILE ############################### addfd_mjlala kksks sksks ks annsns_bbox_2 (sksksk ksks ) adnndn_nsns_bbox_3 (( jsjsdj sjsj ) malm_dkdm lsls lsl mdndk_mkmd_dkd_bbox_4_kdkd ksksk skksk_bbox_jsj_KSK ((jsjsj jsjsj )... (2 Replies)
Discussion started by: kshitij
2 Replies
mapiproxy/libmapistore/mapistore_errors.h(3)		   OpenChange mapistore library 	      mapiproxy/libmapistore/mapistore_errors.h(3)

NAME
mapiproxy/libmapistore/mapistore_errors.h - This header provides a set of result codes for MAPISTORE function calls. SYNOPSIS
Enumerations enum mapistore_error { MAPISTORE_SUCCESS = 0, MAPISTORE_ERROR = 1, MAPISTORE_ERR_NO_MEMORY = 2, MAPISTORE_ERR_ALREADY_INITIALIZED = 3, MAPISTORE_ERR_NOT_INITIALIZED = 4, MAPISTORE_ERR_CORRUPTED = 5, MAPISTORE_ERR_INVALID_PARAMETER = 6, MAPISTORE_ERR_NO_DIRECTORY = 7, MAPISTORE_ERR_DATABASE_INIT = 8, MAPISTORE_ERR_DATABASE_OPS = 9, MAPISTORE_ERR_BACKEND_REGISTER = 10, MAPISTORE_ERR_BACKEND_INIT = 11, MAPISTORE_ERR_CONTEXT_FAILED = 12, MAPISTORE_ERR_INVALID_NAMESPACE = 13, MAPISTORE_ERR_NOT_FOUND = 14, MAPISTORE_ERR_REF_COUNT = 15, MAPISTORE_ERR_EXIST = 16, MAPISTORE_ERR_INVALID_DATA = 17, MAPISTORE_ERR_MSG_SEND = 18, MAPISTORE_ERR_MSG_RCV = 19, MAPISTORE_ERR_DENIED = 20, MAPISTORE_ERR_NOT_IMPLEMENTED } Detailed Description This header provides a set of result codes for MAPISTORE function calls. Enumeration Type Documentation enum mapistore_error Enumerator: MAPISTORE_SUCCESS The function call succeeded. MAPISTORE_ERROR The function call failed for some non-specific reason. MAPISTORE_ERR_NO_MEMORY The function call failed because it was unable to allocate the memory required by underlying operations. MAPISTORE_ERR_ALREADY_INITIALIZED The function call failed because underlying context has already been initialized. MAPISTORE_ERR_NOT_INITIALIZED The function call failed because context has not been initialized. MAPISTORE_ERR_CORRUPTED The function call failed because an internal mapistore storage component has corrupted data. MAPISTORE_ERR_INVALID_PARAMETER The function call failed because one of the function parameters is invalid. MAPISTORE_ERR_NO_DIRECTORY The function call failed because the directory doesn't exist. MAPISTORE_ERR_DATABASE_INIT The function call failed because the underlying function couldn't open a database. MAPISTORE_ERR_DATABASE_OPS The function call failed because the underlying function didn't run a database operation successfully. MAPISTORE_ERR_BACKEND_REGISTER The function failed to register a storage backend. MAPISTORE_ERR_BACKEND_INIT One of more storage backend initialization functions failed to complete successfully. MAPISTORE_ERR_CONTEXT_FAILED The function failed because mapistore failed to create a context. MAPISTORE_ERR_INVALID_NAMESPACE The function failed because the provided namespace is invalid. MAPISTORE_ERR_NOT_FOUND The function failed to find requested record/data. MAPISTORE_ERR_REF_COUNT The function still has a reference count. MAPISTORE_ERR_EXIST The function already have record/data for the searched element. MAPISTORE_ERR_INVALID_DATA The function failed to generate requested data/payload. MAPISTORE_ERR_MSG_SEND The function failed to send message. MAPISTORE_ERR_MSG_RCV The function failed to receive message. MAPISTORE_ERR_DENIED The operation required privileges that the user does not have. MAPISTORE_ERR_NOT_IMPLEMENTED The function is not implemented. Author Generated automatically by Doxygen for OpenChange mapistore library from the source code. Version 1.0 Sat Jun 14 2014 mapiproxy/libmapistore/mapistore_errors.h(3)
All times are GMT -4. The time now is 05:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy