ex - text editor
'ex - file1' - edit file1 in silent mode ('-')
printf '....' | ex - feed the editing command to 'ex' - commands are separated by NL (\n)
'$' - go to the end of the file (file1)
'r file2' - read in file2
'w! file2' - write out the result to file2
'q!' - quite the 'ex' session.
Hi this is quite simple i am sure but without using awk or sed i need to add text to the top of a file this is what i have got so far
#!bin/bash
echo "Add text to top of file"
read line
echo $line >> file1
This adds the text to the bottom of the file can some1 please help cheers (7 Replies)
Hi,
I wanted to add specific text to each row in a text file containing three rows. Example:
0 8 7 6 5 5
7 8 9 0 7 9
7 8 9 0 1 2
And I want to add a 21 at the beginning of the first row, and blank spaces at the beginning of the second two rows. To get this:
21 0 8 7 6 5 5
7 8... (4 Replies)
Dear All,
I have two files
One is script file in which I am writing commands to append a text in a normal file.
I want to insert the text on top of the file.
I dont want to use sed and awk commands nor temp file.
is it possible? (3 Replies)
Hi All
I am making a script in which.I have a problem i try to discribe.
File1 content need to be append in file 2 but such as if content already exist then dont add.
File1 IS Like this
myname
yourname
hername
hisname
File2
%AddNameHere myname yourname hername hisname (3 Replies)
I am attempting to insert multiple lines of text into a specific place in a text file based on the lines above or below it.
For example, Here is a portion of a zone file.
IN NS ns1.domain.tld.
IN NS ns2.domain.tld.
IN ... (2 Replies)
Hello,
I after some assistance please. Below is a file I need to read and for each line write an output.
My input file looks like this
2 20008 2003-08-26
2 20032 2003-08-26
2 20041 2003-08-26
2 20037 2003-08-26
2 20050 2003-08-26
6 ... (6 Replies)
I have a text file that has data like:
Data "12345#22"
Fred
ID 12345
Age 45
Wilma
Dino
Data "123#22"
Tarzan
ID 123
Age 33
Jane
I need to figure out a way of adding 1,000,000 to the specific lines (always same format) in the file, so it becomes:
Data "1012345#22"
Fred
ID... (16 Replies)
If I have a txt file with
test.txt
somelineoftext
and I want to set that line of text to variable in a script:
so
#!/bin/bash
var=''
becomes
#!/bin/bash
var='somelineoftext' (3 Replies)
Discussion started by: digitalviking
3 Replies
LEARN ABOUT SUSE
xcmssetcccofcolormap
XcmsCCCOfColormap(3) XLIB FUNCTIONS XcmsCCCOfColormap(3)NAME
XcmsCCCOfColormap, XcmsSetCCCOfColormap - query and modify CCC of a colormap
SYNTAX
XcmsCCC XcmsCCCOfColormap(Display *display, Colormap colormap);
XcmsCCC XcmsSetCCCOfColormap(Display *display, Colormap colormap, XcmsCCC ccc);
ARGUMENTS
display Specifies the connection to the X server.
ccc Specifies the CCC.
colormap Specifies the colormap.
DESCRIPTION
The XcmsCCCOfColormap function returns the CCC associated with the specified colormap. Once obtained, the CCC attributes can be queried or
modified. Unless the CCC associated with the specified colormap is changed with XcmsSetCCCOfColormap, this CCC is used when the specified
colormap is used as an argument to color functions.
The XcmsSetCCCOfColormap function changes the CCC associated with the specified colormap. It returns the CCC previously associated with
the colormap. If they are not used again in the application, CCCs should be freed by calling XcmsFreeCCC. Several colormaps may share the
same CCC without restriction; this includes the CCCs generated by Xlib with each colormap. Xlib, however, creates a new CCC with each new
colormap.
SEE ALSO DisplayOfCCC(3), XcmsConvertColors(3), XcmsCreateCCC(3), XcmsDefaultCCC(3), XcmsSetWhitePoint(3)
Xlib - C Language X Interface
X Version 11 libX11 1.3.2 XcmsCCCOfColormap(3)