05-21-2003
with vi its possible
:%s/.$//g
this will delete every last char on each line.
This User Gave Thanks to Bashar For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
2. Shell Programming and Scripting
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
3. UNIX for Advanced & Expert Users
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
4. HP-UX
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
5. Shell Programming and Scripting
Hi everyone,
I'm very new to using sed, run through some tutorials and everything but I've hit a problem that I'm unable to solve by myself.
I need to remove all linefeeds that are followed by a particular character (in this case a semicolon). So basically, all lines starting with a semicolon... (5 Replies)
Discussion started by: fluffdasheep
5 Replies
6. Shell Programming and Scripting
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
7. Shell Programming and Scripting
Good afternoon:
im working wih 2 files to find differences and use the cmp command
cmp file1 file2
file1 file2 are are diifferent char 302 line1
i found what the difference is with the sed command and that is the file1 at the end of every line has a (,) (comma) character.
i.e
sed -n... (4 Replies)
Discussion started by: alexcol
4 Replies
8. UNIX for Dummies Questions & Answers
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
9. UNIX for Dummies Questions & Answers
Hi All,
Could any one suggest how to remove $ symbol in a text file when i am opening in vi editor.
Scenario;
For example iam having a file name aaa.txt the data inside the file is like
sample
name
when i am opening in vi editor
The same file resembles like below when i am... (1 Reply)
Discussion started by: Chandru_Raj
1 Replies
10. Shell Programming and Scripting
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
LEARN ABOUT DEBIAN
grid-mapfile-delete-entry
GRID-MAPFILE-DELET(8) Globus Commands GRID-MAPFILE-DELET(8)
NAME
grid-mapfile-delete-entry - Remove entries from a gridmap file
SYNOPSIS
grid-mapfile-delete-entry [-help] [-usage] [-version] [-versions]
grid-mapfile-delete-entry {-dn DISTINGUISHED-NAME} {-ln LOCAL-NAME...}
[[-d] | [-dryrun]]
[[-mapfile MAPFILE] | [-f MAPFILE]]
DESCRIPTION
The grid-mapfile-delete-entry program deletes mappings from a gridmap file. If both the -dn and -ln> options are specified,
grid-mapfile-delete-entry removes entries which meet both criteria (remove entries mapping DISTINGUISHED-NAME to LOCAL-NAME for each
LOCAL-NAME specified). If only -dn or -ln is specified all entries for that DISTINGUISHED-NAME or LOCAL-NAME are removed.
By default, grid-mapfile-delete-entry will modify the gridmap file named by the GRIDMAP environment variable if present, or the file
/etc/grid-security/grid-mapfile if not. This can be changed by the use of the -mapfile or -f command-line options.
Prior to modifying a gridmap file, grid-mapfile-delete-entry saves its current contents to a file with the string .old appended to the
original file name.
The full set of command-line options to grid-mapfile-delete-entry are:
-help, -usage
Display the command-line options to grid-mapfile-delete-entry.
-version, -versions
Display the version number of the grid-mapfile-delete-entry command. The second form includes more details.
-dn DISTINGUISHED-NAME
The X.509 distinguished name to remove from the gridmap file. If the -ln option is not specified, remove all entries for this name;
otherwise, remove entries that match both this name and the local name. The name should be in OpenSSL's oneline format.
-ln LOCAL-NAME...
The POSIX user name to remove from the gridmap file. Include multiple LOCAL-NAME strings after the -ln command-line option to remove
multiple names from the gridmap. If the -dn option is not specifeid, remove all entries for these names; otherwise, remove entries that
match the DISTINGUISHED-NAME and any of the LOCAL-NAME values.
-d, -dryrun
Display diagnostics about what would be removed from the gridmap file, but don't actually modify the file.
-mapfile MAPFILE, -f MAPFILE
Modify the gridmap file named by MAPFILE instead of the default.
EXAMPLES
Remove all mappings for a distinguished name:
% grid-mapfile-delete-entry "/DC=org/DC=example/DC=grid/CN=Joe User"
Modifying /etc/grid-security/grid-mapfile ...
Deleting entry: "/DC=org/DC=example/DC=grid/CN=Joe User" juser,juser2
(1) entry deleted
Remove the mapping between a distinguished name and a single local username:
% grid-mapfile-delete-entry "/DC=org/DC=example/DC=grid/CN=Joe User" -ln juser2
Modifying /etc/grid-security/grid-mapfile ...
Current entry: "/DC=org/DC=example/DC=grid/CN=Joe User" juser
(1) mapping removed: (juser2), (0) not present and ignored
(0) entries deleted
ENVIRONMENT VARIABLES
The following environment variables affect the execution of grid-mapfile-delete-entry:
GRIDMAP
Path to the default gridmap to modify.
FILES
The following files affect the execution of grid-mapfile-delete-entry:
/etc/grid-security/grid-mapfile
Path to the default gridmap to modify if GRIDMAP environment variable is not set.
SEE ALSO
grid-mapfile-add-entry(8), grid-mapfile-check-consistency(8)
AUTHOR
University of Chicago
Globus Toolkit 5.0.1 03/19/2010 GRID-MAPFILE-DELET(8)