03-11-2009
Text files union
How can i union two files that each of them contain text to one new file in unix shell scripting or in awk scripting language?
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How do I use the grep command to take mutiple text files in a folder and make one huge text file out of them. I'm using Mac OS X and can not find a text tool that does it so I figured I'd resort to the BSD Unix CLI for a solution... there are 5,300 files that I want to write to one huge file so... (7 Replies)
Discussion started by: coppertone
7 Replies
2. Shell Programming and Scripting
Is there a command in unix to find the union of two files and removing the union from one of the files?
e.g. I have two files input1.txt and input2.txt with the contents below:
$ more input1.txt
4
2
3
2
$ more input2.txt
5
4
4
8
2
I want to find the union of the two and... (7 Replies)
Discussion started by: stevefox
7 Replies
3. Shell Programming and Scripting
Given two files of the same format (For example number1|text1|number2) what is the command to print lines in file1 which do not occur in file2? diff command seems a bit complicated for me for this purpose. Please help!! Thank you very much. (3 Replies)
Discussion started by: sherkaner
3 Replies
4. Shell Programming and Scripting
Hi all,
I have difficulty to solve the followign problem.
mydata:
StartPoint EndPoint
22 55
2222 2230
33 66
44 58
222 240
11 25
22 60
33 45
The union of above... (2 Replies)
Discussion started by: phoeberunner
2 Replies
5. Web Development
Hi,
A piece of script from Perl-cookbook I do not understand, and post here for explanation.
The purpose is to find the element in either array (union), and in both array (intersection). Thank you in advance.
@a=qw(1 3 5 6 7 8);
@b=qw(2 3 5 7 9);
foreach $e (@a, @b) {$union{$e}++ &&... (3 Replies)
Discussion started by: yifangt
3 Replies
6. Programming
My concept may sound a bit cryptic but I what some startup information as to how we can use GDB APIs / debugging techniques in programs with GCC when we compile the program. We can definitely tell gcc to link GDB libs also. The ultimate aid would be that when the compiled programs executes it... (4 Replies)
Discussion started by: uunniixx
4 Replies
7. Shell Programming and Scripting
Hello everyone,
I work under Ubuntu 11.10 (c-shell)
I need a script to create a new text file whose content is the text of another text files that are in the directory $DIRMAIL at this moment.
I will show you an example:
- On the one hand, there is a directory $DIRMAIL where there are... (1 Reply)
Discussion started by: tenteyu
1 Replies
8. Shell Programming and Scripting
Hi,
I have a huge file that has data something like shown below:
huge_file.txt
start regexp
Name=Name1
Title=Analyst
Address=Address1
Department=Finance
end regexp
some text
some text
start regexp
Name=Name2
Title=Controller
Address=Address2
Department=Finance
end regexp (7 Replies)
Discussion started by: r3d3
7 Replies
9. Programming
Sorry for the “word salad” subject, but I wanted to cast a wide net for help.
I've created an IP (Internet Protocol) server which serves HTTP, SMTP, and FTP requests.
As you probably know, they all require creating a socket, listening on it, accepting connections, and then having a short... (3 Replies)
Discussion started by: John S.
3 Replies
LEARN ABOUT DEBIAN
xotclsh
xotclsh(1) XOTcl Applications xotclsh(1)
__________________________________________________________________________________________________________________________________________________
NAME
xotclsh - Tcl Shell containing object-oriented scripting language XOTcl
SYNOPSIS
xotclsh ?filename arg arg ...?
_________________________________________________________________
DESCRIPTION
xotclsh is a shell-like application that reads XOTcl commands from its standard input or from a file and evaluates them. Similarly as the
relation between tclsh and wish, xowish provides all functionality of xotclsh and provides as well predefined support for TK widgets.
XOTcl (XOTcl, pronounced exotickle) is an object-oriented scripting language based on MIT's OTcl. It is intended as a value added replace-
ment of OTcl.
Scripting languages, such as Tcl, are designed for glueing components together, provide features such as dynamic extensibility and dynamic
typing with automatic conversion, that make them well suited for rapid application development.
The object system of XOTcl enables a user to to define objects, classes, and meta-classes. Classes are special objects with the purpose of
managing other objects. ``Managing'' means that a class controls the creation and destruction of its instances and that it contains a
repository of methods accessible for the instances. Every object may be enhanced with object-specific methods. XOTcl supports single and
multiple inheritance. All object-class and class-class relationships in XOTcl are introspectable and can be dynamically changed at arbi-
trary times. Ambiguities in name resolution of methods are avoided through method chaining through "next", which does not require explicit
method naming.
XOTcl combines the ideas of scripting and object-orientation in a way that preserves the benefits of both of them. It is equipped with sev-
eral new language constructs that help building and managing complex systems. We added the following support:
Dynamic Object Aggregations, to provide dynamic aggregations through nested namespaces (objects).
Nested Classes, to reduce the interference of independently developed program structures.
Assertions, to reduce the interface and the reliability problems caused by dynamic typing and, therefore, to ease the combination of many
components.
Meta-data, to enhance self-documentation of objects and classes.
Per-object mixins, as a means to give an object dynamically access to the methods of one or several supplemental classes.
Per-class mixins, as a means to give all instances of an class dynamically access to the methods of one or several supplemental classes.
Filters as a means of abstractions over method invocations to implement large program structures, like design patterns.
XOTcl provides a value-added replacement of Tcl package loading providing integration with object-oriented constructs and tracking/tracing
of component loading.
VARIABLES
xotclsh sets all variables that tclsh sets, and additionally the following variables:
::xotcl::version XOTcl version number.
::xotcl::confdir Directory for XOTcl configuration.
::xotcl::logdir Directory where logfiles are placed.
KEYWORDS
argument, interpreter, prompt, script file, shell
XOTcl xotclsh(1)