Sponsored Content
Top Forums Shell Programming and Scripting delete first 2 characters for each line, please help Post 302597667 by ambious on Saturday 11th of February 2012 10:05:46 AM
Old 02-11-2012
AWK one
Code:
awk -F"/" '{print $2}' urfile


Last edited by Franklin52; 02-11-2012 at 11:45 AM.. Reason: Please use code tags for data and code samples, thank you
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

delete duplicated characters in each line

I'm a biologist trying to analyse some data and I'll appreciate some help with the following problem. I have a column of characters which I'll like to delete the duplicated characters in each line and report only the unique one.No sorting should be done. E.g. The original data: GTG CTC CTC... (5 Replies)
Discussion started by: ivpz
5 Replies

2. Shell Programming and Scripting

Delete new line characters from a file

Hi, I have a file with about 25 colums separated with '~', but few of the lines have extra tabs ('^') and new line characters ('$'). Is there a way I can delete those characters if they are anywhere before the 25th column in a line? example: CLUB000650;12345678;0087788667;NOOP MEMBER ... (4 Replies)
Discussion started by: rudoraj
4 Replies

3. Shell Programming and Scripting

Delete characters from each line

Hi, I have a file that has data in the following manner, tt_0.00001.dat 123.000 tt_0.00002.dat 124.000 tt_0.00002.dat 125.000 This is consistent for all the entries in the file. I want to delete the 'tt_' and '.dat' from each line. Could anyone please guide me how to do this using awk or... (2 Replies)
Discussion started by: lost.identity
2 Replies

4. Shell Programming and Scripting

Delete characters from each line until meet character ":"

Hello, I have file that looks like this : 765327564:line1 94:line2 7865:line3 ..... 765322:linen I want to cut all the digits from the beginning of each line up to ":" character and to have everything like this : line1 line2 line3 ..... linen P.S : content of line1 ...... (8 Replies)
Discussion started by: black_fender
8 Replies

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

6. UNIX for Dummies Questions & Answers

How to delete text between two characters in line?

Hi, I have a large text file with the following format: >gi|347545744|gb|JN204951.1| Dismorphia spio voucher 5 ATCAAATTCCTTCCTCTCCTTAAA >gi|17544664774|gb|WN204922.32| Rodapara nigens gene region CCGGGCAAATTCCTTCCTCTCCTTAAA >gi|555466400|gb|SG255122.8| Bombyx mandariana genbank 3... (1 Reply)
Discussion started by: euspilapteryx
1 Replies

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

8. Programming

Mismatched free() / delete / delete [] line no missing

Could you tell me the possibilities of the reason to get the Mismatched free() / delete / delete . I unable to see the line no in the valgrind report. it displays the function name. with that function name, I am not able to find where exactly the issue is there.I am getting the Mismatched free()... (3 Replies)
Discussion started by: SA_Palani
3 Replies

9. Shell Programming and Scripting

Remove first 2 characters and last two characters of each line

here's what im trying to do. i have a file containing lines similar to this: data.txt: 1hsRmRsbHRiSFZNTTA1dlEyMWFkbU5wUW5CSlIyeDFTVU5SYjJOSFRuWmpia0ZuWXpKV2FHTnRU 1lKUnpWMldrZFZaMG95V25oYQpSelEyWTBka2QyRklhSHBrUjA1b1kwUkJkd3BOVXpWM1lVaG5k... (5 Replies)
Discussion started by: SkySmart
5 Replies

10. Shell Programming and Scripting

Delete special characters

My sed is not working on deleting the entire special characters and leaving what is necessary.grep connections_per a|sed -e 's/\<\!\-\-//g' INPUT: <!-- <connections_per_instance>1</connections_per_instance> --> <method>HALF</method> <!--... (10 Replies)
Discussion started by: kenshinhimura
10 Replies
BNSTAT(1)							BNETD User's Manual							 BNSTAT(1)

NAME
bnstat - Battle.net statisics client SYNOPSIS
bnstat [options] [servername [serverport]] DESCRIPTION
bnstat is a simple Battle.net client emulator that can be used to gather player statistics. It is also compatible with FSGS servers, but has difficulty with real Battle.net servers. If no servername is specified, localhost is assumed. If no serverport is specified, 6112 is assumed. If no player is specified on the command line, bnstat(1) will connect to the server and prompt for one from stdin. All avaliable statistics for the emulated client type are formatted and displayed on stdout. OPTIONS
-b Causes bnstat to emulate a Brood Wars client. --client Causes bnstat to emulate a specific client. The following client tags are recognized: DRTL DSHR STAR SSHR SEXP W2BN. There are short options which may be used instead for the common clients. --bnetd Also attempt to gather bnetd(1) specific information. -d Causes bnstat to emulate a Diablo client. --fsgs Also attempt to gather FSGS specific information. -h --help --usage Print usage information and exit. -k --cdkey Causes bnstat to report an alternate key to the bnetd(1) server. -o --owner Causes bnstat to report an alternate owner to the bnetd(1) server. -p --player Gather statistics only for the specified player and then exit. This also avoids using login and terminal functions allowing it to be used in shell scripts. -s Causes bnstat to emulate a Starcraft client. -v --version Print its version number and exit. -w Causes bnstat to emulate a Warcraft II BNE client. NOTES
The current version is available with the bnetd distribution at: http://www.bnetd.org/ BUGS
This program assumes that the terminal will move to the beginning of the current line when the carriage return character (^M) is printed. It also assumes the backspace character (^H) will move one column to the left that character printed after that will replace those already on the screen. The terminal settings are not consulted for keybindings. The following are assumed: ^H delete the character to the left of the cursor ^J accept current line ^M (return) accept current line ^T transpose the last two characters ^W delete word to the left of the cursor ^U delete the whole input line ^[ (escape) cancel the current input line ^? (delete) delete the character to the left of the cursor SEE ALSO
bnetd(1) AUTHOR
Ross Combs (ross@bnetd.org) BNETD
11 June, 2000 BNSTAT(1)
All times are GMT -4. The time now is 02:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy