Actually, you can do this with a few changes to your script by building a translation list from your .txt file and using that to change the sequence number. I assume that CRC1 was to become ColonTrio1; wasn't quite sure based on your description.
I put the 'real' commands in an echo for testing -- it will print out what it would do without really doing it so you can validate before doing damage with the mv command etc. There will probably be many more commands echoed as multiple files found that generate the same merged file will test true in the if, where when running things for real the first file that results in a merge will supress additional files which were merged in. (Hope that makes sense)
Last edited by agama; 12-19-2011 at 03:22 PM..
Reason: typo -- clarification
Hi friends :)
I am having a small problem and ur help is needed...
I have a long file from which i want to select only some portions after filtering (grep).
My file looks like :
header
xxyy
lmno
xxyy
wxyz
footer
header
abcd
xy
pqrs
footer
.
. (14 Replies)
I'm looking to determine if I can use a grep command to read file and rename the file based on the first 3 characters of the data in the file.
An example is:
Read FileA
If the first 3 positions of the data in the file are "ITP", then rename the file as FileA_ITP, else if the first 3... (3 Replies)
Well the title is not too good, so I will explain.
I need to move (rename) files using a simple AIX script.
???file1.txt
???file2.txt
???file1a.txt
???file2a.txt
to be:
???renamedfile1'date'.txt
???renamedfile2'date'.txt
???renamedfile1a'date'.txt
???renamedfile2a'date'.txt
... (4 Replies)
All,
Below is the file, what i need to do is take the text in between the /*-- and --*/ , i mean the jobs. Then i have grep for system name . If the job is there in system 1 i have to print to a file.
Basically i want to take all the jobs that are in system1 to another file . because... (7 Replies)
Hi everyone.
I'm in need of a solution where i need to rename a folder to a name that's inside an XML file in that folder.
OS is Ubuntu 9.10 with Gnome.
I've tried using grep, sed and xpath, but can't seem to find a solution.
This is the simplified folder structure:
FOLDER-NAME
-... (4 Replies)
Good day.
I need a one-liner (if possible) otherwise a longer script to do the following:
I have a list of files in a directory with the same filename extension, ie.
firstfile.cks, anotherfile.cks, somefile.cks, etc.The filename and extension, however, are incorrect. The correct filename... (7 Replies)
I am trying to use the two files shown below to either remove or rename contents in one of those files. If in file1.txt $5 matches $5 of file2.txt and the value in $1 of file1.txt is not "No Match" then that value is substituted for all values in $5 and $1 of file2.txt. If however in $1 ... (5 Replies)
Hello, I have a text file "file.list" with the contents below.
file1
filename1
file2
filename2
file3
filename3
file1, file2 and file3 are files existing in the same directory as the text file file.list.
I want to rename file1 to filename1, file2 to filename2, as show in the text... (1 Reply)
In the below bash I am trying to copy the only text file (always only one) in /home/cmccabe/Desktop/list/QC/metrics.txt and rename each of the 3 text files according to /home/cmccabe/Desktop/test/list.txt using lines 3, 4 ,5. This format (that is list.txt) is always 5 lines. Thank you :).
... (12 Replies)
In the portion of bash below I am using rename to match the $id variable to $file and when a match (there will alwsys be one) is found then the $id is removed from each bam and bam.bai in $file and _test is added to thee file name before the extension. Each of the variables is set correctly but... (3 Replies)
Discussion started by: cmccabe
3 Replies
LEARN ABOUT CENTOS
xtuninstalltranslations
XtParseTranslationTable(3) XT FUNCTIONS XtParseTranslationTable(3)NAME
XtParseTranslationTable, XtAugmentTranslations, XtOverrideTranslations, XtUninstallTranslations - manage translation tables
SYNTAX
XtTranslations XtParseTranslationTable(String table);
void XtAugmentTranslations(Widget w, XtTranslations translations);
void XtOverrideTranslations(Widget w, XtTranslations translations);
void XtUninstallTranslations(Widget w);
ARGUMENTS
table Specifies the translation table to compile.
translations
Specifies the compiled translation table to merge in (must not be NULL).
w Specifies the widget into which the new translations are to be merged or removed.
DESCRIPTION
The XtParseTranslationTable function compiles the translation table into the opaque internal representation of type XtTranslations. Note
that if an empty translation table is required for any purpose, one can be obtained by calling XtParseTranslationTable and passing an empty
string.
The XtAugmentTranslations function nondestructively merges the new translations into the existing widget translations. If the new transla-
tions contain an event or event sequence that already exists in the widget's translations, the new translation is ignored.
The XtOverrideTranslations function destructively merges the new translations into the existing widget translations. If the new transla-
tions contain an event or event sequence that already exists in the widget's translations, the new translation is merged in and override
the widget's translation.
To replace a widget's translations completely, use XtSetValues on the XtNtranslations resource and specify a compiled translation table as
the value.
The XtUninstallTranslations function causes the entire translation table for widget to be removed.
SEE ALSO XtAppAddActions(3), XtCreatePopupShell(3), XtParseAcceleratorTable(3), XtPopup(3)
X Toolkit Intrinsics - C Language Interface
Xlib - C Language X Interface
X Version 11 libXt 1.1.4 XtParseTranslationTable(3)