Hello, I need help in appending the line number of each line to the file and also to get the total number of lines. Can somebody please help me.
I have a file say:
abc
def
ccc
ddd
ffff
The output should be:
Instance1=abc
Instance2=def
Instance3=ccc
Instance4=ddd
Instance5=ffff
... (2 Replies)
Hi,
I have a huge file & I want to add a specific text in column. But I want to add this text from a specific line number to a specific line number & another text in to another range of line numbers.
To be more specific: lets say my file has 1000 lines & 4 Columns. I want to add text "Hello"... (2 Replies)
i want a shell script program for how many times a word occur in a file.
i need not the line number but i want the counts of the particular word
for eg:-
hai how r u..
i am from andhra pradesh..
i am from tenali.i need this answer.i need it urgently..
i hope u will answer this ...
... (9 Replies)
Hi Everybody,
I am trying to write a script that will get some perticuler data from a file and redirect to a file.
My Question is,
I have a Very huge file,In that file I have my required data is started from 25th line and it will ends in 100th line.
I know the line numbers, I need to get all... (9 Replies)
Hi,
Please suggest how to write a shell script which delets all the lines containing the word unix in the files supplied as argument in the shell. (4 Replies)
Hello Everyone.
I am trying to display contains of a file from a specific line to a specific line(let say, from line number 3 to line number 5). For this I got the shell script as shown below:
if ; then
if ; then
tail +$1 $3 | head -n $2
else
... (5 Replies)
Hello everyone,
I don't really know anything about scripting, but I have to manage to make this script, out of necessity.
#!/bin/bash
while read -r line; do #I'm reading from a big wordlist
instructions using $line
done
Is there a way to automatically write the $line number the script... (4 Replies)
Hi,
I have a unix file which has many lines, i need to join all the lines to single line.
Eg: myfile.txt contains:
a
123
45fg
try
and i need the output as :
a 123 45fg try
Please help me on this.
Thanks! (2 Replies)
my requirement is,
consider a file output
cat output
blah sdjfhjkd jsdfhjksdh
sdfs 23423 sdfsdf sdf"sdfsdf"sdfsdf"""""dsf
hellow there
this doesnt look good
et cetc etc
etcetera
i want to replace a line of line number 4 ("this doesnt look good") with some other line
... (3 Replies)
Discussion started by: vivek d r
3 Replies
LEARN ABOUT DEBIAN
tclx_keyedlistgetkeys
Tcl_GetKeyedListKeys(3tclx)Tcl_GetKeyedListKeys(3tclx)NAME
TclX_NewKeyedListObj, TclX_KeyedListGet, TclX_KeyedListSet, TclX_KeyedListDelete, TclX_KeyedListGetKeys - Keyed list management routines.
SYNOPSIS
#include <tclExtend.h>
Tcl_Obj *
TclX_NewKeyedListObj (void);
int
TclX_KeyedListGet (Tcl_Interp *interp,
Tcl_Obj *keylPtr,
char *key,
Tcl_Obj **valuePtrPtr);
int
TclX_KeyedListSet (Tcl_Interp *interp,
Tcl_Obj *keylPtr,
char *key,
Tcl_Obj *valuePtr);
int
TclX_KeyedListDelete (Tcl_Interp *interp,
Tcl_Obj *keylPtr,
char *key);
int
TclX_KeyedListGetKeys (Tcl_Interp *interp,
Tcl_Obj *keylPtr,
char *key,
Tcl_Obj **listObjPtrPtr);
DESCRIPTION
These routines perform operations on keyed lists. See the Extended Tcl man page for a description of keyed lists.
TclX_NewKeyedListObj
Create and initialize a new keyed list object.
Returns:
A pointer to the object.
TclX_KeyedListGet
Retrieve a key value from a keyed list.
Parameters:
o interp - Error message will be return in result if there is an error.
o keylPtr - Keyed list object to get key from.
o key - The name of the key to extract. Will recusively process sub-keys seperated by `.'.
o valueObjPtrPtr - If the key is found, a pointer to the key object
is returned here. NULL is returned if the key is not present.
Returns:
o TCL_OK - If the key value was returned.
o TCL_BREAK - If the key was not found.
o TCL_ERROR - If an error occured.
TclX_KeyedListSet
Set a key value in keyed list object.
Parameters:
o interp - Error message will be return in result object.
o keylPtr - Keyed list object to update.
o key - The name of the key to extract. Will recusively process sub-key seperated by `.'.
o valueObjPtr - The value to set for the key.
Returns:
TCL_OK or TCL_ERROR.
TclX_KeyedListDelete
Delete a key value from keyed list.
Parameters:
o interp - Error message will be return in result if there is an error.
o keylPtr - Keyed list object to update.
o key - The name of the key to extract. Will recusively process sub-key seperated by `.'.
Returns:
o TCL_OK - If the key was deleted.
o TCL_BREAK - If the key was not found.
o TCL_ERROR - If an error occured.
TclX_KeyedListGetKeys
Retrieve a list of keyed list keys.
Parameters:
o interp - Error message will be return in result if there is an error.
o keylPtr - Keyed list object to get key from.
o key - The name of the key to get the sub keys for. NULL or empty to retrieve all top level keys.
o listObjPtrPtr - List object is returned here with key as values.
Returns:
o TCL_OK - If the zero or more key where returned.
o TCL_BREAK - If the key was not found.
o TCL_ERROR - If an error occured.
TclTcl_GetKeyedListKeys(3tclx)