Sponsored Content
Full Discussion: Delete specific characters
Operating Systems AIX Delete specific characters Post 302187437 by Yogesh Sawant on Monday 21st of April 2008 04:48:44 AM
Old 04-21-2008
using Perl:
Code:
perl -pi -e 's/^0+//' filename

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

tell me how many specific characters there are?

i'm trying to get the user to enter a character, then the script should search for how many of that character exists in the file. I have the following code, but it doesn't work properly and it shows the wrong amount (i don't think im supposed to use grep). For example, I want it to say, "There are... (7 Replies)
Discussion started by: kev269
7 Replies

2. Shell Programming and Scripting

How to delete characters using a file

Hi All, I have a configuration file (file.cfg) in which data will be like this ; , _ + a to z A to Z Now i have to read a textfile (file.txt) and i need to check whether there is any other character present in text file that is not existing in (file.cfg). If other characters are present... (4 Replies)
Discussion started by: krishna_gnv
4 Replies

3. Shell Programming and Scripting

need to Delete first 10 characters of a file name

Hello Everyone, I need help in deleting first 10 characters from the filename in a directory eg: 1234567890samplefile1.txt 1234567890samplefile2.txt and so on.. need to get the output as samplefile1.txt Thanks in Advance!!!! (8 Replies)
Discussion started by: Olivia
8 Replies

4. Shell Programming and Scripting

delete first 2 characters for each line, please help

hi, ./R1_970330_210505.sard ./R1_970403_223412.sard ./R1_970626_115235.sard ./R1_970626_214344.sard ./R1_970716_234214.sard ... ... ... for these strings, i wanna remove the ./ for each line how can i do that? i know it could possibly be done by sed, but i really have not idea how... (4 Replies)
Discussion started by: sunnydanniel
4 Replies

5. Shell Programming and Scripting

sed replacing specific characters and control characters by escaping

sed -e "s// /g" old.txt > new.txt While I do know some control characters need to be escaped, can normal characters also be escaped and still work the same way? Basically I do not know all control characters that have a special meaning, for example, ?, ., % have a meaning and have to be escaped... (11 Replies)
Discussion started by: ijustneeda
11 Replies

6. Shell Programming and Scripting

How delete characters of specific line with sed?

Hi, I have a text file with some lines like this: /MEDIA/DISK1/23568742.MOV /MEDIA/DISK1/87456321.AVI /MEDIA/DISK2/PART1/45753131.AVI /IMPORT/44452.WAV ... I want to remove the last 12 characters in each line that it ends "AVI". Should look like this: /MEDIA/DISK1/23568742.MOV... (12 Replies)
Discussion started by: inaki
12 Replies

7. Shell Programming and Scripting

Can't figure out how to find specific characters in specific columns

I am trying to find a specific set of characters in a long file. I only want to find the characters in column 265 for 4 bytes. Is there a search for that? I tried cut but couldn't get it to work. Ex. I want to find '9999' in column 265 for 4 bytes. If it is in there, I want it to print... (12 Replies)
Discussion started by: Drenhead
12 Replies

8. Shell Programming and Scripting

Count specific characters at specific column positions

Hi all, I need help. I have an input text file (input.txt) like this: 21 GTGCAACACCGTCTTGAGAGG 50 21 GACCGAGACAGAATGAAAATC 73 21 CGGGTCTGTAGTAGCAAACGC 108 21 CGAAAAATGAACCCCTTTATC 220 21 CGTGATCCTGTTGAAGGGTCG 259 Now I need to count A/T/G/C numbers at each character location in column... (2 Replies)
Discussion started by: thienxho
2 Replies

9. Shell Programming and Scripting

Delete and retain some characters

Ive been trying to google and tried sed and awk. BUt still getting no exact formula. I would like to know how to parse this at: From: Compute Machin Appliance 3.2.9.10000 123456 To: Compute Machin Appliance 3.2.9.123456 (5 Replies)
Discussion started by: kenshinhimura
5 Replies

10. Shell Programming and Scripting

Count specific character of a file in each line and delete this character in a specific position

I will appreciate if you help me here in this script in Solaris Enviroment. Scenario: i have 2 files : 1) /tmp/TRANSACTIONS_DAILY_20180730.txt: 201807300000000004 201807300000000005 201807300000000006 201807300000000007 201807300000000008 2)... (10 Replies)
Discussion started by: teokon90
10 Replies
KEYBOARD(6)							   Games Manual 						       KEYBOARD(6)

NAME
keyboard - how to type characters DESCRIPTION
Keyboards are idiosyncratic. It should be obvious how to type ordinary ASCII characters, backspace, tab, escape, and newline. In Plan 9, the key labeled Return or Enter generates a newline (0x0A); if there is a key labeled Line Feed, it generates a carriage return (0x0D); Plan 9 eschews CRLFs. All control characters are typed in the usual way; in particular, control-J is a line feed and control-M a carriage return. On the PC and some other machines, the key labeled Caps Lock acts as an additional control key. The delete character (0x7F) may be generated by a different key, one near the extreme upper right of the keyboard. On the Next it is the key labeled (not the asterisk above the 8). On the SLC and Sparcstation 2, delete is labeled Num Lock (the key above Backspace labeled Delete functions as an additional backspace key). On the other keyboards, the key labeled Del or Delete generates the delete character. The view character (0x80), used by 81/2(1) and sam(1), causes windows to scroll forward. It is generally somewhere near the lower right of the main key area. The scroll character is generated by the VIEW key on the Gnot, the Alt Graph key on the SLC, and any of the three arrow keys <-, v, and -> on the other terminals. Characters in Plan 9 are runes (see utf(6)). Any 16-bit rune can be typed using a compose key followed by several other keys. The compose key is also generally near the lower right of the main key area: the NUM PAD key on the Gnot, the Alternate key on the Next, the Compose key on the SLC, the Option key on the Magnum, and either Alt key on the PC. After typing the compose key, type a capital and exactly four hexadecimal characters (digits and to to type a single rune with the value represented by the typed number. There are shorthands for many characters, comprising the compose key followed by a two- or three-character sequence. There are several rules guiding the design of the sequences, as illustrated by the following examples. The full list is too long to repeat here, but is contained in the file in a format suitable for grep(1) or look(1). A repeated symbol gives a variant of that symbol, e.g., ?? yields c. ASCII digraphs for mathematical operators give the corresponding operator, e.g., <= yields <=. Two letters give the corresponding ligature, e.g., AE yields AE. Mathematical and other symbols are given by abbreviations for their names, e.g., pg yields 9|. Chess pieces are given by a w or b followed by a letter for the piece (k for king, q for queen, r for rook, n for knight, b for bishop, or p for pawn), e.g., wk for a white king. Greek letters are given by an asterisk followed by a corresponding latin letter, e.g., *d yields d. Cyrillic letters are given by an at sign followed by a corresponding latin letter or letters, e.g., @ya yields . Script letters are given by a dollar sign followed by the corresponding regular letter, e.g., $F yields . A digraph of a symbol followed by a letter gives the letter with an accent that looks like the symbol, e.g., ,c yields c. Two digits give the fraction with that numerator and denominator, e.g., 12 yields 1/2. The letter s followed by a character gives that character as a superscript, e.g., s1 yields 1. Sometimes a pair of characters give a symbol related to the superimposition of the characters, e.g., cO yields (C). A mnemonic letter followed by $ gives a currency symbol, e.g., l$ yields L. Note the difference between B (ss) and u (micron) and the Greek B and u. FILES
/lib/keyboard sorted table of characters and keyboard sequences SEE ALSO
intro(1), ascii(1), tcs(1), 81/2(1), sam(1), cons(3), utf(6) KEYBOARD(6)
All times are GMT -4. The time now is 11:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy