Sponsored Content
Top Forums Shell Programming and Scripting sed command to delete everything after > on line Post 302657981 by LMHmedchem on Monday 18th of June 2012 02:19:22 PM
Old 06-18-2012
Thanks, that worked great. Sed is such a great tool. I had a 250K text file with odd formatting that would have blown up the next tool in the chain and sed fixed it in 23s. At times, it does look a bit like hieroglyphics, and I really need to find my notes, but there is nothing like the right tool for the job.

Thanks again,

LMHmedchem
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed: delete regex line and next line if blank

Hi, I want to write a sed script which from batiato: batiato/giubbe: pip_b.2.txt pip_b.3.txt pip_b.3mmm.txt bennato: bennato/peterpan: 123.txt consoli: pip_a.12.txt daniele: (2 Replies)
Discussion started by: one71
2 Replies

2. Shell Programming and Scripting

USING sed to delete a line

Please let me know wat would be sed command to delete any partcular line from a file and also moving lines below it to up. ie wen line #9 is deleted data in line #10 should move to #9 and so on. (2 Replies)
Discussion started by: fidelis
2 Replies

3. Shell Programming and Scripting

Sed or Grep to delete line containing patter plus extra line

I'm new to using sed and grep commands, but have found them extremely useful. However I am having a hard time figuring this one out: Delete every line containing the word CEN and the next line as well. ie. test.txt blue 324 CEN green red blue 324 CEN green red blue to produce:... (2 Replies)
Discussion started by: rocketman88
2 Replies

4. Shell Programming and Scripting

SED delete only first line command - Help need

Can any one help me how the sed delete only first line command (D) works. sed -f sedcmds File.txt In this how the sed delete only first line command (D) works to delete the blank lines appearing more than ones leaving only one blank and deleting others blanks. While doing step by step when... (2 Replies)
Discussion started by: gwgreen1
2 Replies

5. Shell Programming and Scripting

Delete a line between selected lines using sed or any other command

I want to delete a line between selected lines using sed: e.g. : Between "bus" to "pins", delete lines conaining "signal" word. Input : bus direction signal new signal old pins signal ok end Desired Output: bus direction pins signal end (4 Replies)
Discussion started by: nehashine
4 Replies

6. Shell Programming and Scripting

sed command to delete line

HI, Im using the below commmand to delete lines having "(" at the start of a line. sed -e '/^(/d' But i need a command to delete lines that has only "(" in it and no other strings. infile - asdf asdf ( asdf ( asd outfile (1 Reply)
Discussion started by: dvah
1 Replies

7. Shell Programming and Scripting

delete the line with a particular string in a file using sed command.

Hello, I want to delete all lines with given string in file1 and the string val is dynamic. Can this be done using sed command. Sample: vars="test twinning yellow" for i in $vars do grep $i file1 if then echo "Do Nothing" else sed `/$i/d` file1 fi done Using the above... (5 Replies)
Discussion started by: PrasadAruna
5 Replies

8. Shell Programming and Scripting

sed command to grep multiple pattern present in single line and delete that line

here is what i want to achieve.. i have a file with below contents cat fileName blah blah blah . .DROP this REJECT that . --sport 7800 -j REJECT --reject-with icmp-port-unreachable --dport 7800 -j REJECT --reject-with icmp-port-unreachable . . . more blah blah blah --dport 3306... (14 Replies)
Discussion started by: vivek d r
14 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

How to delete line from file using sed command?

hello Team, I want to delete below linux using sed command but I am getting error.sed -i '/url=/status.cgi?hostgroup=/d' 3 error:sed: -e expression #1, char 32: unknown option to `s' Could you please help me with correct syntax. My line contain / character because of that I am getting... (4 Replies)
Discussion started by: ghpradeep
4 Replies
MC-TOOL(1)							     Utilities								MC-TOOL(1)

NAME
mc-tool - manipulate Mission Control accounts from the command line SYNOPSIS
mc-tool list mc-tool add PROFILE DISPLAY-NAME [PARAMETER-SETTINGS...] mc-tool add MANAGER/PROTOCOL [PARAMETER-SETTINGS...] mc-tool update ACCOUNT [PARAMETER-SETTINGS...] mc-tool display ACCOUNT DISPLAY-NAME mc-tool nick ACCOUNT NICKNAME mc-tool icon ACCOUNT ICON mc-tool show ACCOUNT mc-tool get ACCOUNT PARAMETER [PARAMETER...] mc-tool auto-presence ACCOUNT STATUS [MESSAGE] mc-tool request ACCOUNT STATUS [MESSAGE] mc-tool auto-connect ACCOUNT on|off mc-tool remove ACCOUNT DESCRIPTION
mc-tool's usage depends on its first argument (the "command") SPECIFYING ACCOUNTS Where an account name is needed, it may be given as a full object path (e.g. /org/freedesktop/Telepathy/Account/gabble/jabber/example), or as the unique account-specific suffix (e.g. gabble/jabber/example). SPECIFYING PARAMETER SETTINGS Many commands take arguments that represent Telepathy connection manager parameters (see the Telepathy Specification for details of these). Each argument has the following form: TYPE:NAME=VALUE where TYPE is either int, uint, bool, or string (other parameter types exist, but are currently unsupported by mc-tool), NAME is the name of the connection manager parameter (e.g. account or password), and VALUE is the parameter's value (with integers in decimal, and booleans as 0 or 1). The update command also accepts arguments of the form clear:NAME which delete the named parameter from the account configuration. LIST mc-tool list lists the available accounts. ADD mc-tool add adds an account. The connection manager and protocol can either be given as the name of a Mission Control profile, (e.g. gtalk), or as a slash-separated connection manager name and protocol (e.g. gabble/jabber). DISPLAY mc-tool display ACCOUNT DISPLAY-NAME sets the DisplayName property of ACCOUNT to DISPLAY-NAME. NICK mc-tool nick ACCOUNT NICKNAME sets the Nickname property of ACCOUNT to NICKNAME. ICON mc-tool icon ACCOUNT ICON sets the Icon property of ACCOUNT to ICON. SHOW mc-tool show ACCOUNT shows information about ACCOUNT. GET mc-tool get ACCOUNT PARAMETER [PARAMETER...] shows the values of the given parameters of ACCOUNT. ENABLE mc-tool enable ACCOUNT sets the Enabled property of ACCOUNT to True. DISABLE mc-tool disable ACCOUNT sets the Enabled property of ACCOUNT to False. AUTO-PRESENCE mc-tool auto-presence ACCOUNT STATUS [MESSAGE] sets the AutomaticPresence property of ACCOUNT to STATUS with optional message MESSAGE. REQUEST mc-tool request ACCOUNT STATUS [MESSAGE] sets the RequestedPresence property of ACCOUNT to STATUS with optional message MESSAGE; this is how you tell an account to connect or go offline, for example. AUTO-CONNECT mc-tool auto-connect ACCOUNT on sets the ConnectAutomatically property of ACCOUNT to True. mc-tool auto-connect ACCOUNT off sets it to False. Telepathy July 2009 MC-TOOL(1)
All times are GMT -4. The time now is 06:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy