Hi,
Is it possible to remove the first part of the file name using find.
i.e i have something like 2006abc.txt , 1007bed.txt etc,
I wanna rename them to abc.txt , bed.txt
I tried some stupid way..
find . -name '*.txt' -exec mv {} `cut -f2-5 -d"_" {}` \;
somehow iam not getting it.
... (3 Replies)
I have an xml file, from where I need to take out Application2 entries and keep the others. I need to remove from <product> to </product> and the key element to look for while removing should be <application> as other pairs can be same for others.
<product>
... (10 Replies)
Greetings everyone. Right now I am working on a script to be used during automated deployment of servers. What I have to do is remove localhost.localdomain and localhost6.localdomain6 from the /etc/hosts file. Simple, right? Except most of the examples I've found using sed want to delete the entire... (4 Replies)
I have a file in below format (pipe delimited):
1234__abc|John__abc|xyz
3345__abc|Kate__abc|xyz
55344|Linda__abc|xyz
33434|Murray|xyz
I want to remove any occurence of "__abc" in the second field of this file.
I did some research and found a way to replace the entire second field with... (5 Replies)
Hi
I have to remove in a file in first column whatever is written in brackets with brackets
so one file
hgfd 123
gfhdj 483
jdgfdg 34738
the output shuld be
hgfd 123
gfhdj 483
jdgfdg 34738 (9 Replies)
Hi,
I have 80 large files, from which I want to get a specific value to run a Bash script. Firstly, I want to get the part of a file which contains this:
Name =A
xxxxxx
yyyyyy
zzzzzz
aaaaaa
bbbbbb
Value = 57
This is necessary because in a file there are written more lines which... (6 Replies)
I need some help. I would like to read in a text file.
Take a variable such as ROW-D-01, compare it to what's in one line in the text file such as PROD/VM/ROW-D-01 and only input PROD/VM into a variable without the /ROW-D-01.
Is this possible? any help is appreciated. (2 Replies)
Gents,
Is there the chance to remove part of the file,
Taking in consideration this condition.
For each record the first row start with the string % VE
should be 56 rows for each records..
first row = % VE
last row = % sw
total 56 rows for each record.
Then in the case that the... (4 Replies)
Hello,
I am java command from a shell script which will generate the below output on the command prompt
signature Base64 :... (10 Replies)
Discussion started by: chetanojha
10 Replies
LEARN ABOUT SUSE
xrmenumeratedatabase
XrmEnumerateDatabase(3) XLIB FUNCTIONS XrmEnumerateDatabase(3)NAME
XrmEnumerateDatabase - enumerate resource database entries
SYNTAX
#define XrmEnumAllLevels 0
#define XrmEnumOneLevel 1
Bool XrmEnumerateDatabase(XrmDatabase database, XrmNameList name_prefix, XrmClassList class_prefix, int mode, Bool (*proc)(), XPointer
arg);
ARGUMENTS
database Specifies the resource database.
name_prefix
Specifies the resource name prefix.
class_prefix
Specifies the resource class prefix.
mode Specifies the number of levels to enumerate.
proc Specifies the procedure that is to be called for each matching entry.
arg Specifies the user-supplied argument that will be passed to the procedure.
DESCRIPTION
The XrmEnumerateDatabase function calls the specified procedure for each resource in the database that would match some completion of the
given name/class resource prefix. The order in which resources are found is implementation-dependent. If mode is XrmEnumOneLevel, a
resource must match the given name/class prefix with just a single name and class appended. If mode is XrmEnumAllLevels, the resource must
match the given name/class prefix with one or more names and classes appended. If the procedure returns True, the enumeration terminates
and the function returns True. If the procedure always returns False, all matching resources are enumerated and the function returns
False.
The procedure is called with the following arguments:
(*proc)(database, bindings, quarks, type, value, arg)
XrmDatabase *database;
XrmBindingList bindings;
XrmQuarkList quarks;
XrmRepresentation *type;
XrmValue *value;
XPointer arg;
The bindings and quarks lists are terminated by NULLQUARK. Note that pointers to the database and type are passed, but these values should
not be modified.
The procedure must not modify the database. If Xlib has been initialized for threads, the procedure is called with the database locked and
the result of a call by the procedure to any Xlib function using the same database is not defined.
SEE ALSO XrmGetResource(3), XrmInitialize(3), XrmPutResource(3)
Xlib - C Language X Interface
X Version 11 libX11 1.3.2 XrmEnumerateDatabase(3)