07-30-2009
the input file cannot be changed :
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file which has some lines starting with a particular word. I would like to delete 5 lines before each such line containing that particular word.
eg:
line1
line2
line3
line4
line5
line6
"particular word"...
I would like to delete line2-line6 and all such occurences in that... (4 Replies)
Discussion started by: ramu_1980
4 Replies
2. UNIX for Dummies Questions & Answers
I'm looking to show specific lines (eg. 20 through 40) of a series of files in the directory. How do I do this? (2 Replies)
Discussion started by: hedgehog001
2 Replies
3. UNIX for Dummies Questions & Answers
I'm trying to figure out how to display a certain line in a text file. I keep getting references to Tail and Head, and I know how these work, but i'm lost on how to find say the third out of the five lines and display only that.
I thought maybe grep could help, but that doesn't seem likely.
... (3 Replies)
Discussion started by: MaestroRage
3 Replies
4. UNIX for Dummies Questions & Answers
are there any basic commands that can display lines 99 - 101 of the /etc/passwd file?
I'm thinking use of head and tail, but I forget what numbers to use and where to put /etc/passwd in the command. (2 Replies)
Discussion started by: raidkridley
2 Replies
5. Shell Programming and Scripting
Hello All,
I am new to this forum. I am currently facing a problem in manipulating files.
I have two files called old-matter and new-matter
# cat old-matter
abc: this, is a, sample, entry
byi: white board, is white in color
rtz: black, board is black
qty: i tried, a lot
asd: no... (1 Reply)
Discussion started by: rahmathulla
1 Replies
6. Shell Programming and Scripting
Hi
this script adds text in the correct place on one line only, in a script.
awk 'BEGIN{
printf "Enter residue and chain information: "
getline var < "-"
split(var,a)
}
/-s rec:/{$7=a; }
{print}' FLXDOCK
but I need the same info added at position 7 on line 34 and... (1 Reply)
Discussion started by: gav2251
1 Replies
7. Solaris
Hi,
I have a small piece of Makefile script which throw's error on Sun Sparc machine, but works fine with Sun Optron, Linux, AIX machines.
FOO=Naveen
test1:FOO=Dhilip
test1:
@echo FOO is ${FOO}
test2:
@echo Me is ${FOO}
Output on Sun Sparc -
ukhml-v890new-~/test: make test1... (5 Replies)
Discussion started by: nsriram
5 Replies
8. Shell Programming and Scripting
Hi,
I have one file, say file 1, that has data like below where 19900107 is the date,
19900107 12 144 129 0.7380047
19900108 12 168 129 0.3149017
19900109 12 192 129 3.2766666E-02
... (3 Replies)
Discussion started by: Wynner
3 Replies
9. UNIX for Dummies Questions & Answers
This could be a really dummy question.
I have a log text file.
What unix command to extract line from specific string to another specific string.
Is it something similar to?:
more +/"string" file_name
Thanks (4 Replies)
Discussion started by: aku
4 Replies
10. UNIX for Dummies Questions & Answers
Hello All,
this is my first post so I don't know if I am doing this right.
I would like to append entries from a series of strings (contained in a text file) consecutively at the end of specifically labeled lines in another file.
As an example:
- the file that contains the values to be... (3 Replies)
Discussion started by: gus74
3 Replies
LEARN ABOUT DEBIAN
xsupportslocale
XSupportsLocale(3) XLIB FUNCTIONS XSupportsLocale(3)
NAME
XSupportsLocale, XSetLocaleModifiers - determine locale support and configure locale modifiers
SYNTAX
Bool XSupportsLocale(void);
char *XSetLocaleModifiers(char *modifier_list);
ARGUMENTS
modifier_list
Specifies the modifiers.
DESCRIPTION
The XSupportsLocale function returns True if Xlib functions are capable of operating under the current locale. If it returns False, Xlib
locale-dependent functions for which the XLocaleNotSupported return status is defined will return XLocaleNotSupported. Other Xlib locale-
dependent routines will operate in the ``C'' locale.
The XSetLocaleModifiers function sets the X modifiers for the current locale setting. The modifier_list argument is a null-terminated
string of the form ``{@category=value}'', that is, having zero or more concatenated ``@category=value'' entries, where category is a cate-
gory name and value is the (possibly empty) setting for that category. The values are encoded in the current locale. Category names are
restricted to the POSIX Portable Filename Character Set.
The local host X locale modifiers announcer (on POSIX-compliant systems, the XMODIFIERS environment variable) is appended to the modi-
fier_list to provide default values on the local host. If a given category appears more than once in the list, the first setting in the
list is used. If a given category is not included in the full modifier list, the category is set to an implementation-dependent default
for the current locale. An empty value for a category explicitly specifies the implementation-dependent default.
If the function is successful, it returns a pointer to a string. The contents of the string are such that a subsequent call with that
string (in the same locale) will restore the modifiers to the same settings. If modifier_list is a NULL pointer, XSetLocaleModifiers also
returns a pointer to such a string, and the current locale modifiers are not changed.
If invalid values are given for one or more modifier categories supported by the locale, a NULL pointer is returned, and none of the cur-
rent modifiers are changed.
At program startup, the modifiers that are in effect are unspecified until the first successful call to set them. Whenever the locale is
changed, the modifiers that are in effect become unspecified until the next successful call to set them. Clients should always call XSet-
LocaleModifiers with a non-NULL modifier_list after setting the locale before they call any locale-dependent Xlib routine.
The only standard modifier category currently defined is ``im'', which identifies the desired input method. The values for input method
are not standardized. A single locale may use multiple input methods, switching input method under user control. The modifier may specify
the initial input method in effect or an ordered list of input methods. Multiple input methods may be specified in a single im value
string in an implementation-dependent manner.
The returned modifiers string is owned by Xlib and should not be modified or freed by the client. It may be freed by Xlib after the cur-
rent locale or modifiers are changed. Until freed, it will not be modified by Xlib.
SEE ALSO
Xlib - C Language X Interface
X Version 11 libX11 1.5.0 XSupportsLocale(3)