09-10-2011
sed help with character removal
Hello
I've got a string of text with a number in pence, e.g. 0.52p, I need to remove the 'p' so that it just reads 0.52 without of course removing all the other 'p' characters.
Many thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a script that produces an output containing '/.ssh'.
I am trying to find a way of parsing only this data from a single line, without removing any other special characters contained within the output as a result of the parse.
Any help would be appreciated (6 Replies)
Discussion started by: Raggedranger333
6 Replies
2. Shell Programming and Scripting
Hi,
Could you please help me in removal of newline chracter present in between the double quotes and replacing it with space.
For example ...
Every field is wrapped with double quotes with comma delimiter, so I need to travese from first double quote occerence to till second double... (7 Replies)
Discussion started by: vsairam
7 Replies
3. Shell Programming and Scripting
Hi All,
Was wondering how I can do the following....
I have a String as follows
"ACCTRL000005022RRWDKKEEDKDD...."
This string can be in a file called tail.out or in a Variable called $VAR2
Now I have another variable called $VAR1="000004785" (9 bytes long), I need the content of... (5 Replies)
Discussion started by: mohullah
5 Replies
4. Shell Programming and Scripting
I'd like to remove (do a pattern or precise replacement - this I can handle in SED using Regex )
---AFTER THE 1ST Occurrence ( i.e. on the 2nd occurrence - from the 2nd to fourth occurance ) of a specific string : type 1
-- After the 1st occurrence of 1 string1 till the 1st occurrence of... (4 Replies)
Discussion started by: sieger007
4 Replies
5. OS X (Apple)
To the group, when I copy text from a web page that has the below java code , and then do the set list command in the vi editor, I see the $ symbol at the end of each line. I have searched the internet looking for a way to remove this from the file since it will not compile without errors..Please... (6 Replies)
Discussion started by: smartino
6 Replies
6. Shell Programming and Scripting
Hello,
I'm trying to remove an arbitrary number of semicolons at the end of each line in the input file.
Input:
44;I;1000031;;;B;0137;0;;01.02.2008;03.02.2009;;;;;;;;;;;;;0028-101746;;;
45;I;1000031;;;B;0137;0;;01.02.2008;03.02.2009;;;;;;;;;;;;;0028-101746;;;;;
... (6 Replies)
Discussion started by: uioreanu
6 Replies
7. Shell Programming and Scripting
Hi,
The command - id | awk '{print $1}' - returns the following:
uid=9028(luke)
What do I need to further that awk so that I only have "luke", I want to set this as a variable.
Thanks in advance,
Lukas.
P.S: I've come up with:
USER1=`id | awk F'(' '{print $2}' | awk -F')' '{print... (4 Replies)
Discussion started by: luke222010
4 Replies
8. Shell Programming and Scripting
can anyone share script for how to remove control m character (1 Reply)
Discussion started by: pw227j
1 Replies
9. Shell Programming and Scripting
Hello folks!
Raised a bump on my head trying to figure this one out ;)
I have an xml file which needs to be edited, removing an entire property section in the work. Here's what the target section layout looks like:
<property name="something">
{any number of lines go here}
</property>... (7 Replies)
Discussion started by: LinQ
7 Replies
10. Shell Programming and Scripting
Hi,
Anyone can help using SED searches a character string for a specified delimiter character, and returns a leading or trailing space/blank.
Text file :
"1"|"ExternalClassDEA519CF5"|"Art1"
"2"|"ExternalClass563EA516C"|"Art3"
"3"|"ExternalClass305ED16B8"|"Art9"
...
...
... (2 Replies)
Discussion started by: fspalero
2 Replies
LEARN ABOUT DEBIAN
orphaner
orphaner(8) orphaner(8)
NAME
orphaner - frontend for deborphan
SYNOPSIS
orphaner [--help|--purge] [deborphan options]
DESCRIPTION
orphaner is a neat frontend for deborphan displaying a list of orphaned packages with dialog or whiptail. Packages may be selected for
removal with apt-get which is then called to do the work. After removal a new list of orphaned packages is gathered from deborphan. The
program ends when either `Cancel' is pressed or no package is marked for removal.
After you removed a package, all new orphaned packages are shown at the top of the list separated by +++++ from the old list.
Orphaner also shows two additional buttons: `Simulate' and `Help'. `Simulate' does like its name suggest only a simulation of removing and
shows the result that would appear after real removing. So you can see the packages, which will become orphaned and you can select them and
remove all packages with one apt-get call.
`Help' shows you the status of the package given by dpkg -s. Caution: your selection will be lost.
OPTIONS
--help Print a short help and exit.
--skip-apt
Do not call apt-get, but show apt-get command line instead.
--purge
Call apt-get remove with the --purge option.
orphaner accepts most, but not all, options that deborphan accepts. These options are passed to deborphan unchanged, and described in
deborphan's manpage. Options which are not accepted include switches to manage the keep file, and switches to change the output format.
Note that switches which take an argument need to passed as one argument to orphaner. For instance to only show packages of priority
optional and less important, you need to use --priority=optional (i.e. with the = sign, not with a space).
SEE ALSO
deborphan(1), orphaner(8), apt-get(8)
April 2004 orphaner(8)