Sponsored Content
Top Forums UNIX for Advanced & Expert Users Exclude dash (-) from word separators in vi Post 302610735 by jim mcnamara on Wednesday 21st of March 2012 05:34:07 PM
Old 03-21-2012
Well, I had not thought about it. Hmm. For vim edit .vimrc
Code:
#change this
set iskeyword=!-~,^*,^45,^124,^34,192-255
#to this
set iskeyword=!~,^*,^45,^124,^34,192-255

I'll dig thru some junk to see about vi
This User Gave Thanks to jim mcnamara For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

want to remove separators from file

Hi, I have huge file, head -1 filneame gives, I just want to remove "##colsep##" from the file, and also want to count the no. of fileds present, as in Output shld be in newfile as TRADE_KEY,TRADE_DATE and total no. of fileds separated by these comma's ... (7 Replies)
Discussion started by: niceboykunal123
7 Replies

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

3. Shell Programming and Scripting

how to use two separators in awk.

Hi, Gurus, I have a file like 1 234, 345, 456 2 345, 456, 345 I want to use awk with multipe separator ( one is comma, another is space)print out $1, $3 which should be: 1, 345 2, 456 but I don't know how to put space as separator with another separator. Thanks in advance (7 Replies)
Discussion started by: ken002
7 Replies

4. Ubuntu

[Solved] Using Find with an exclude/exclude file

I am familiar with using tar and exclude/include files: tar zcf backup.dirs.tgz --files-from=include.mydirs --exclude-from=exclude.mydirs --no-recursion but was wondering if I could use find in the same way. I know that you can just specify the directories to exclude but my list is... (2 Replies)
Discussion started by: metallica1973
2 Replies

5. UNIX for Dummies Questions & Answers

Can one use 2 field separators in awk?

I have files such as n02-z30-dsr65-terr0.25-dc0.008-16x12drw-run1.cmd I am wondering if it is possible to define two field separators "-" and "." for these strings so that $7 is run1. (5 Replies)
Discussion started by: kristinu
5 Replies

6. UNIX for Dummies Questions & Answers

Find EXACT word in files, just the word: no prefix, no suffix, no 'similar', just the word

I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL. I need the whole word... (6 Replies)
Discussion started by: chicchan
6 Replies

7. Shell Programming and Scripting

How to ignore quoted separators

Hi, I'm trying to parse a text file which uses commas as field separators. Fields are double quoted, and may themselves contain commas, like this: "1","John Smith","London","123" "2","Mary Robertson","Horsham, Sussex","456" This causes problems for the following command cut -d","... (7 Replies)
Discussion started by: sven44
7 Replies

8. Shell Programming and Scripting

Script to count word occurrences, but exclude some?

I am trying to count the occurrences of ALL words in a file. However, I want to exclude certain words: short words (i.e. <3 chars), and words contained in an blacklist file. There is also a desire to count words that are capitalized (e.g. proper names). I am not 100% sure where the line on... (5 Replies)
Discussion started by: Cronk
5 Replies

9. Shell Programming and Scripting

Exclude dash in grep

Hi, I must be overlooking something, but I don't understand why this doesn't work. I'm trying to grep on a date, excluding all the lines starting with a dash: testfile: #2013-12-31 2013-12-31code: grep '^2013-12-31' testfileI'm expecting to see just the second line '2013-12-31' but I don't... (3 Replies)
Discussion started by: Subbeh
3 Replies

10. Shell Programming and Scripting

A dash to GOTO or a dash from GOTO, that is the question...

Well, guys I saw a question about GOTO for Python. So this gave me the inspiration to attempt a GOTO function for 'dash', (bash and ksh too). Machine: MBP OSX 10.14.3, default bash terminal, calling '#!/usr/local/bin/dash'... This is purely a fun project to see if it is possible in PURE... (3 Replies)
Discussion started by: wisecracker
3 Replies
Tk_GetDash(3TK) 					       Tk Library Procedures						   Tk_GetDash(3TK)

__________________________________________________________________________________________________________________________________________________

NAME
Tk_GetDash - convert from string to valid dash structure. SYNOPSIS
#include <tk.h> int Tk_GetDash(interp, string, dashPtr) ARGUMENTS
Tcl_Interp *interp(in) Interpreter to use for error reporting. CONST char * string(in) Textual value to be converted. Tk_Dash *dashPtr (out) Points to place to store the dash pattern value converted from string. _________________________________________________________________ DESCRIPTION
These procedure parses the string and fills in the result in the Tk_Dash structure. The string can be a list of integers or a character string containing only [.,-_] or spaces. If all goes well, TCL_OK is returned. If string doesn't have the proper syntax then TCL_ERROR is returned, an error message is left in the interpreter's result, and nothing is stored at *dashPtr. The first possible syntax is a list of integers. Each element represents the number of pixels of a line segment. Only the odd segments are drawn using the "outline" color. The other segments are drawn transparent. The second possible syntax is a character list containing only 5 possible characters [.,-_ ]. The space can be used to enlarge the space between other line elements, and can not occur as the first posibion in the string. Some examples: -dash . = -dash {2 4} -dash - = -dash {6 4} -dash -. = -dash {6 4 2 4} -dash -.. = -dash {6 4 2 4 2 4} -dash {. } = -dash {2 8} -dash , = -dash {4 4} The main difference of this syntax with the previous is that it it shape-conserving. This means that all values in the dash list will be multiplied by the line width before display. This assures that "." will always be displayed as a dot and "-" always as a dash regardless of the line width. On systems where only a limited set of dash patterns, the dash pattern will be displayed as the most close dash pattern that is available. For example, on Windows only the first 4 of the above examples are available. The last 2 examples will be displayed identically as the first one. KEYWORDS
dash, conversion ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWTk | +--------------------+-----------------+ |Interface Stability | Uncommitted | +--------------------+-----------------+ NOTES
Source for Tk is available on http://opensolaris.org. Tk 8.3 Tk_GetDash(3TK)
All times are GMT -4. The time now is 09:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy