Sponsored Content
Top Forums Shell Programming and Scripting problem removing a word from a file in vi Post 302601000 by koricha on Wednesday 22nd of February 2012 04:18:51 PM
Old 02-22-2012
Thank you DGPickett
 

10 More Discussions You Might Find Interesting

1. Programming

removing first bit from the word

Hello, I have a code like this : pstSimPOIInfo.ppcName = realloc(pstSimPOIInfo.ppcName, (usLen+strlen(CountryName)+4)); memset(pstSimPOIInfo.ppcName, 0, (usLen+strlen(CountryName)+4)); strncpy((char *)pstSimPOIInfo.ppcName, CityName, strlen(CityName)) strcat(pstSimPOIInfo.ppcName, ",");... (3 Replies)
Discussion started by: jazz
3 Replies

2. UNIX for Dummies Questions & Answers

Removing a specific word from a created list

I am working on a script that prompts a user name and creates a list in a username.dat file. Furthermore, I have created a sorted_username.dat file. My question is this: My script uses the word "finished" != finished to break the while loop. How can I avoid having the word "finished" show up in... (5 Replies)
Discussion started by: erest8
5 Replies

3. Shell Programming and Scripting

Vi - removing last word

Hi All, I want to remove last word from a line using Vi. Do we have any vi command for that. line : ss dd ff gg i have to run some vi command which can delete gg from the line Thanks, Ravi Sadani (4 Replies)
Discussion started by: ravi.sadani19
4 Replies

4. Shell Programming and Scripting

Exclude specific word from input file problem asking...

Hi, Below is my input file and desired output file: Input file: >header_N_1 ASFDGDGNDGEGWETWRYWTETWNETOWETWETWNETTETNWET . . Desired output file: >header_N_1 ASFDGDGDGEGWETWRYWTETWETOWETWETWETTETWET . . From the input file, I just hope to exclude the 'N' word from its content... (5 Replies)
Discussion started by: patrick87
5 Replies

5. Shell Programming and Scripting

Removing the 1st character of the word in perl

Hi All, In one of the sections in my perl script, I need to remove the 1st character of a word and store in an array.The details are , The original script was , if ( ! defined $inq{$node}{"dmx"} ) { print "INFO: Collecting inq disk information for DMX array on $node.\n"; ... (2 Replies)
Discussion started by: abhilash.pa
2 Replies

6. Shell Programming and Scripting

removing a word in a multiple file starting at the dot extension

hi I would like to ask if someone knows a command or a script on how to rename a multiple file in the directory starting at the end of the filename or at the .extension( i would like to remove the last 11 character before the extension) for example Below is the result of my command ls inside... (5 Replies)
Discussion started by: jao_madn
5 Replies

7. Shell Programming and Scripting

removing newlines after a certain word.

Hello! This is my first post here. I have a file with text like: A</title> B C</title> D I need to format it to: AB CD I am trying to use sed: sed 's/<//title>\n/ /g' file > newfile to delete </title> and the newline character, but the file is unchanged because there are... (3 Replies)
Discussion started by: DaytonCPS
3 Replies

8. UNIX for Advanced & Expert Users

Performance problem with removing duplicates in a huge file (50+ GB)

I'm trying to remove duplicate data from an input file with unsorted data which is of size >50GB and write the unique records to a new file. I'm trying and already tried out a variety of options posted in similar threads/forums. But no luck so far.. Any suggestions please ? Thanks !! (9 Replies)
Discussion started by: Kannan K
9 Replies

9. Shell Programming and Scripting

Removing hyphen from beginning and end of a word only.

It is very simple to remove a hyphen from a word anywhere in that word using a simple sed command (sed -i 's/-//g' filename), but I am not able to figure out how to do this: For example, apple -orange tree pipe- banana-shake dupe- What my output should look like: apple orange tree... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

10. Shell Programming and Scripting

Add words in beginning , end after removing a word in a file

My file has the entries like below... /dev/sds /dev/sdak /dev/sdbc /dev/sdbu I want to make the file like below echo 1 > /sys/block/sds/device/rescan echo 1 > /sys/block/sdak/device/rescan echo 1 > /sys/block/sdbc/device/rescan echo 1 > /sys/block/sdbu/device/rescan (2 Replies)
Discussion started by: saravanapandi
2 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 04:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy