12-26-2008
[Solved] SED is making my head-hurt...
That works perfectly, thx matrixmadhan!!!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
sed 's/abc/xyz/g' abc.txt > abc.txt
This change all the abc s in abc.txt to xyz s but does not write back to the abc.txt.
Suggest me the cleaner way without using temp file please.
Cheers,
Amol. (3 Replies)
Discussion started by: amol
3 Replies
2. Shell Programming and Scripting
Input:
You can easily do this by highlighting your code.
How can i get the substring from index 9 to 12 using sed? (6 Replies)
Discussion started by: cola
6 Replies
3. Shell Programming and Scripting
Hello!
Please bare with me, I'm a total newbie to scripting. Here's the sudo code of what I'm trying to do:
Get file name
Does file exist?
If true
get length of file name
get network id (this will be the last 3 numbers of the file name)
loop x 2
If... (1 Reply)
Discussion started by: KatieV
1 Replies
4. Shell Programming and Scripting
hello, I'm trying to write the fastest sed command possible (large files will be processed) to replace RICH with NICK in a file which looks like this (below) if the occurance of RICH is uppercase, replace with uppercase if it's lowercase, replace with lowercase
SOMTHING_RICH_SOMTHING <- replace... (10 Replies)
Discussion started by: rich@ardz
10 Replies
5. Shell Programming and Scripting
Hi All,
After reading that the sort command in Linux can be made to use many processor cores just by using a simple script which I found on the internet, I was wondering if I can use similar techniques for programs like the awk and sed?
#!/bin/bash
# Usage: psort filename <chunksize>... (7 Replies)
Discussion started by: shoaibjameel123
7 Replies
6. Shell Programming and Scripting
I want to make the first character of some words to be uppercase. I have a file like the one below.
uid,givenname,sn,cn,mail,telephonenumber
mattj,matt,johnson,matt johnson,mattj@gmail.com
markv,mark,vennet,matt s vennet,markv@gmail.com
mikea,mike,austi,mike austin,mike@gmail.com
I want... (3 Replies)
Discussion started by: matt12
3 Replies
7. Shell Programming and Scripting
i have something like this in a file
cat onlytables.sql
create table NextID (
id int auto_increment,
zoneID int,
entityName varchar(64),
nextID int,
lastModified TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
primary... (6 Replies)
Discussion started by: vivek d r
6 Replies
8. Shell Programming and Scripting
how can i make find/sed to include directory names with spaces
the command is like this
for i in `find wp-content/themes -type f -print0 | xargs -0 grep -l
-iE 'e'`;do sed -i -e 's/word1/word2/gI' "$i";done
but it skips one directory names with spaces
sed: can't read ./Nova: No such... (5 Replies)
Discussion started by: vanessafan99
5 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
I am new to unix.
In this forum some days back, I have read something like below:
1) Do not use perl if awk can do your work.
2) Do not use awk if sed can do your work.
.
.
.
I do not re-collect the whole thing. I think it is good to know the precedence of using these... (2 Replies)
Discussion started by: Prathmesh
2 Replies
10. UNIX for Beginners Questions & Answers
Dears,
In the below string, please let me know how to make the sed search case-incensitive. I have more such lines in my script instead of let me know any other easier option.
sed -n '/dn: MSISDN=/,/^\s*$/p' full.ldif > temp ; sed -n... (4 Replies)
Discussion started by: Kamesh G
4 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)