Sponsored Content
Top Forums Shell Programming and Scripting Script to remove first character if it is zero Post 302372450 by Scrutinizer on Wednesday 18th of November 2009 03:22:30 AM
Old 11-18-2009
Code:
sed 's/^0//' infile

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to Remove Garbage Character

Hello, Whenever I transfer files between machines, I find a garbage character (^M) being appended to the end of every line of the file. Can you suggest a script wherein I can eliminate the garbage character. I tried sed 's/^M//g' < filename > filename1 ...but it doesn't work. Also, this... (4 Replies)
Discussion started by: Eddie_The_Head
4 Replies

2. Shell Programming and Scripting

Remove a ^M character

Hi, I'd like to ask for some help with the following: I've cut a couple of columns of file1 to create file2 with the following code: cur -f 1,3,8 file1 > file2 Then I need to transfer file 2 from UNIX to Windows and use it further. Unfortunatelly, for some reason the line is displayed... (4 Replies)
Discussion started by: zajtat
4 Replies

3. UNIX for Dummies Questions & Answers

How to remove \ character

Dear Members, I have a file which is a single line file. It has "\" character and i need to replace this character with a new line character. How can we do this? I tried with sed but it did not work. sed 's//"\n"/g' t1 > t2Thanks Sandeep (3 Replies)
Discussion started by: sandeep_1105
3 Replies

4. Shell Programming and Scripting

shell script to remove the last character(.) of a string

hi I have a list of words in a text file. these words are appended by "." at their end. They look something like this. word1. word2. word3. word4. word5. I need to remove the last character "." from all the words. The output must look something like this. word1 word2 word3... (7 Replies)
Discussion started by: ss3944
7 Replies

5. 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

6. Shell Programming and Scripting

remove the first and last character of a string

How can i remove the first and last character of strings like below: "^^^613*" "admt130" "^^^613*" "123456" "adg8484" "DQitYV09dh1C" Means i wanna remove the quotes(""). Please help (17 Replies)
Discussion started by: proactiveaditya
17 Replies

7. Linux

Linux script to remove a character in a file based on position.

Greetings, We have a requirement where we need to loop in a fixed width file in linux and remove a character based on a position for every record. It would highly appreciate if someone can help to automate this. Appreciate your time and help! Regards (3 Replies)
Discussion started by: mailme0205
3 Replies

8. Shell Programming and Scripting

Script to search for a character in files in a Directory & remove it

Hi All, Am new to both Unix & this Forum - Need some help on a script that I am trying to write: In a Directory i have few text files which might or might not contain some text that I am trying to find. Once that text is found in any of the files, it needs to be removed from the file ... (6 Replies)
Discussion started by: rituparna_gupta
6 Replies

9. Shell Programming and Scripting

Shell script remove bad character

I was curious to know how to write into my shell script to remove a character. The character I want to remove is  within a .html file. (18 Replies)
Discussion started by: graphicsman
18 Replies

10. Shell Programming and Scripting

How to remove newline character if it is the only character in the entire file.?

I have a file which comes every day and the file data look's as below. Vi abc.txt a|b|c|d\n a|g|h|j\n Some times we receive the file with only a new line character in the file like vi abc.txt \n (8 Replies)
Discussion started by: rak Kundra
8 Replies
T1DOTLESSJ(1)						      General Commands Manual						     T1DOTLESSJ(1)

NAME
t1dotlessj - create a dotless-j PostScript Type 1 font SYNOPSIS
t1dotlessj [OPTIONS...] font [outputfile] DESCRIPTION
T1dotlessj creates a PostScript Type 1 font whose only character is a dotless 'j' matching the input font's design. It works simply by removing the dot from the input font's 'j'. The output font has three characters: '.notdef', 'space', and 'uni0237', where 'uni0237' is the dotless 'j'. The command fails if the input font already has a dotless 'j' character, or if there seems to be no dot to remove. T1dotlessj writes the created PFA or PFB font to the standard output (but see the --output option); if no input file is supplied, it reads a PFA or PFB font from the standard input. OPTIONS
--output=file, -o file Send output to file instead of standard output. --pfb, -b Output a PFB font. This is the default. --pfa, -a Output a PFA font. --name=name, -n name Set the output font's PostScript name to name. The default is InputFontNameLCDFJ. -q, --quiet Do not generate any error messages. -h, --help Print usage information and exit. -v, --version Print the version number and some short non-warranty information and exit. RETURN VALUES
T1dotlessj exits with one of the following values: 0 A dotless-j font was successfully generated. 1 The font already contained a dotless-j character. 2 The font's "j" character had no dot to remove. 3 The font had no "j" character. >3 An error occurred. SEE ALSO
Adobe Type 1 Font Format AUTHOR
Eddie Kohler (ekohler@gmail.com) Version 2.92 LCDF Typetools T1DOTLESSJ(1)
All times are GMT -4. The time now is 02:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy