Sponsored Content
Top Forums Shell Programming and Scripting remove line feeds followed by character Post 302537182 by fluffdasheep on Thursday 7th of July 2011 10:12:41 AM
Old 07-07-2011
Thanks a bundle, guys. getmmg's solution worked like a charm.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Remove Last Character of Line

Hi, I need to put the single line contents of a file into a variable, but remove the last character, for example the file would have this sort of contents: 2;4;3;10;67;54;96; And I want the variable to be: 2;4;3;10;67;54;96 (notice the last ";" has gone). Unfortunately I can't just... (4 Replies)
Discussion started by: danhodges99
4 Replies

2. Shell Programming and Scripting

Remove line feeds

Hi, I have a fixed width flat file which has 1 as the first char and E as the last character. Some of the records have a carriage return /line feeds . how do I remove them? Let me know. Thanks VSK (8 Replies)
Discussion started by: vsk
8 Replies

3. UNIX for Dummies Questions & Answers

Trying to remove single character from a line

Here is a sample code grep '903' -i user.txt | tail -2 | awk '{print $2}' | sed 's/B//g' the input file has data as such 903-xxx-xxxxB 903-xxx-xxxxB It is a dialer file i want to remove the "B" any help thanks (5 Replies)
Discussion started by: Iz3k34l
5 Replies

4. Shell Programming and Scripting

sed: remove first character from particular line

Hello Experts, I have a file "tt.txt" which is like: #a1=a2 b1=b2 #c1=c2 I need to remove the pound (#) sign from a particular line. In this case let us assume it's 3rd line : "#c1=c2" I can do it through: sed "s/#c1=c2/c1=c2/" tt.txtbut it is possible that I may not know the value... (6 Replies)
Discussion started by: hkansal
6 Replies

5. UNIX for Advanced & Expert Users

To remove new line character

Hi, I am facing one interesting problem : I have a file which contains data like this 459,|1998-11-047|a |b |c \n efg | d|e | \n 459,|1998-11-047|a \n c|b |c \n efg | d|e | \n Basically what I have to do is , I have to remove all \n which is coming ( enclosed ) in between... (7 Replies)
Discussion started by: shihabvk
7 Replies

6. HP-UX

How to remove new line character and append new line character in a file?

Hi Experts, I have data coming in 4 columns and there are new line characters \n in between the data. I need to remove the new line characters in the middle of the row and keep the \n character at the end of the line. File is comma (,) seperated. Eg: ID,Client ,SNo,Rank 37,Airtel \n... (8 Replies)
Discussion started by: sasikari
8 Replies

7. Shell Programming and Scripting

useless line feeds in ldapsearch output. Howto remove with shell script?

Hi $ cat ad.sh ldapsearorg -x -LLL -h sb1131z.testbadbigcorp.org -D "CN=ADMINZZ,OU=AdminRoles,DC=testbadbigcorp,DC=org" -w "UT3w4f57lll--4...4" -b "OU=Test,DC=testbadbigcorp,DC=org" "(&(&(&(&(objectCategory=person)(objectClass=user)(lockoutTime:1.2.840.113556.1.4.804:=4294967295)))))" dn$... (3 Replies)
Discussion started by: slashdotweenie
3 Replies

8. Shell Programming and Scripting

How to remove , if first character on line

Hi, I have a file with lines such as the below. I want to remove the comma only if it is the first character on a line. I can't work out how to do this using sed. *ELSET, ELSET=WHEEL_TD2 63, 64, 65, 72, 82, 88, 89, 92, 120, 121, 152, 181, 190, 221, 252, 259 , 260, 282, 283, 285, 286,... (2 Replies)
Discussion started by: carlr
2 Replies

9. UNIX for Dummies Questions & Answers

Remove last character in each line

Hi guys, Does anyone know how to remove the last character in each of the line? This is what I have: ABCDE.1 GLSJD.2 HIJPL.2 HKAGB.3 IUBWQ.1 What I want (remove the dot and number): ABCDE GLSJD HIJPL HKAGB IUBWQ I tried to use this: sed 's/.*//' But I'm not sure if that is... (3 Replies)
Discussion started by: narachaid
3 Replies

10. Shell Programming and Scripting

Remove character from a column in each line

Hi, I am a newbie to shell scripting (.sh). Please guide me on how to do the below issue. My input file has below data. I want to remove $ sysmbol from the fourth column of each line. (ie, between 4th and 5th pipe symbol) ABC25160|51497|06/02/2010|$32,192.07|MARK|$100|A... (3 Replies)
Discussion started by: rsreejithmenon
3 Replies
APTITUDE-RUN-ST(1)					      Command-line reference						APTITUDE-RUN-ST(1)

NAME
aptitude-run-state-bundle - unpack an aptitude state bundle and invoke aptitude on it SYNOPSIS
aptitude-run-state-bundle [<options>...] <input-file> [<program> [<arguments>...]] DESCRIPTION
aptitude-run-state-bundle unpacks the given aptitude state bundle created by aptitude-create-state-bundle(1) to a temporary directory, invokes <program> on it with the supplied <arguments>, and removes the temporary directory afterwards. If <program> is not supplied, it defaults to aptitude(8). OPTIONS
The following options may occur on the command-line before the input file. Options following the input file are presumed to be arguments to aptitude. --append-args Place the options that give the location of the state bundle at the end of the command line when invoking <program>, rather than at the beginning (the default is to place options at the beginning). --help Display a brief usage summary. --prepend-args Place the options that give the location of the state bundle at the beginning of the command line when invoking <program>, overriding any previous --append-args (the default is to place options at the beginning). --no-clean Do not remove the unpacked state directory after running aptitude. You might want to use this if, for instance, you are debugging a problem that appears when aptitude's state file is modified. When aptitude finishes running, the name of the state directory will be printed so that you can access it in the future. This option is enabled automatically by --statedir. --really-clean Delete the state directory after running aptitude, even if --no-clean or --statedir was supplied. --statedir Instead of treating the input file as a state bundle, treat it as an unpacked state bundle. For instance, you can use this to access the state directory that was created by a prior run with --no-clean. --unpack Unpack the input file to a temporary directory, but don't actually run aptitude. SEE ALSO
aptitude-create-state-bundle(1), aptitude(8), apt(8) AUTHOR
Daniel Burrows <dburrows@debian.org> Author. COPYRIGHT
Copyright 2007 Daniel Burrows. This manual page is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This manual page is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. aptitude-run-state-bundle 0.6. 08/08/2011 APTITUDE-RUN-ST(1)
All times are GMT -4. The time now is 07:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy