12-07-2006
On a side note, funny how it is always whose is bigger, yet, when it comes to scripting/coding, it is always whose is smaller
![Smilie Smilie](https://www.unix.com/images/smilies/smile.gif)
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I am very new to shell scripting and have written a script (below).
However the directory I am searching will contain a file with a .trn extension each day which I want to eliminate.
Each day the file extension overnight will change to trx, if this fails I want to know.
Basically what I... (2 Replies)
Discussion started by: richM
2 Replies
2. Shell Programming and Scripting
Dear All,
can anybody help me out in generating a command that can be used to view the last line of multiples files.
e.g:
file 1 contains 100 records
file 2 contains 200 records
file 3 contails 300 records
now i need a command that can be used to display the last line of each... (7 Replies)
Discussion started by: jojo123
7 Replies
3. Shell Programming and Scripting
Hi ,
I want to rename multiple files with their first line bar the first character + the extension .qual. For the example below the filename should read
7180000000987.qual. I have trawled through different threads for 2 days and I don't seem to find anything I can adopt for this task :confused:
... (7 Replies)
Discussion started by: Bruno
7 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have a directory full of *.txt files. I would like to print the last line of every file to screen.
I know you can use FNR for printing the first line of each file, but how do I access the last line of each file?
This code doesn't work, it only prints the last line of the last file:BEGIN... (5 Replies)
Discussion started by: Liverpaul09
5 Replies
5. Shell Programming and Scripting
Hi,
I need to eliminate each second void line in a text file.
novus
MILLENNIO
ineo
frater
in
episcopatus
,
presbyter
et
diacon|diaconus
, (1 Reply)
Discussion started by: mjomba
1 Replies
6. Shell Programming and Scripting
Hi guys, I'm try making to script for eliminate files rlogins.
path1='/home/*'
for i in `cat /etc/passwd |awk -F: '{print $6}'`; do
if test "$i" = "$path1"; then
echo $i
cd $i
if ; then
echo "$i/.rhosts detectado"|mail -s "rhosts" root
... (14 Replies)
Discussion started by: nena_redbalon
14 Replies
7. Shell Programming and Scripting
I need to insert <filename + comma> into each line of multiple files.
Any idea how to script that?
Regards,
Manu (5 Replies)
Discussion started by: linux.yahoo
5 Replies
8. UNIX for Dummies Questions & Answers
Hi everyone,
I've a requirement to modify an existing line which is common to multiple files. I need to replace that existing line with a new line. I've almost 900 ksh files to edit in the similar fashion in the same directory.
Example:
Existing Line: . $HOME/.eff.env (notice the "." at the... (3 Replies)
Discussion started by: kaleem.adil
3 Replies
9. UNIX for Dummies Questions & Answers
HI All,
I want to know if it is possible to print the same message but into 2 different files in the same command?
Something like
.
..
...
echo "Text" >> file1 && file2
this is because i creating a script which i use a log but i don't want to duplicate lines of command just to... (5 Replies)
Discussion started by: lordseiya
5 Replies
10. Shell Programming and Scripting
I am looking for help in processing of those options: '-n' or '-p'
I understand what they do and how to use them.
But, I would like to use them with more than one file (and without any shell-loop; loading the 'perl' once.)
I did try it and -n works on 2 files.
Question is:
- is it possible to... (6 Replies)
Discussion started by: alex_5161
6 Replies
trf-intro(3trf) trf-intro(3trf)
NAME
trf-intro - Introduction to Trf
SYNOPSIS
package require Tcl ?8.2?
package require Trf ?2.1.3?
DESCRIPTION
The package Trf provides a number of commands which take data and transform them in various ways.
BACKGROUND
The implementation of Trf began as proof-of-concept of the validity and usefulness of the "stacked channel" patches to the core. These
patches allow the writing of extensions to the generic I/O system of the core which are able to intercept all read/write operations on des-
ignated channels, thus giving it the ability to transform the data flowing through these channels as desired.
This allows things like transparent encryption, compression, charset recoding, etc.
Since version 8.2 of the tcl core the aforementioned patches are part of the tcl core itself, changing the status of trf from "extension
requiring core patches" to "normal extension".
Other packages built upon either the stackd channels directly, or Trf are:
[1] TrfCrypt, by myself, contains various encryption systems
[2] TLS, an SSL/TLS implementation by Matt Newman.
[3] Tcl MIME by Marshall Rose.
API
The commands provide by trf can be placed into the three categories listed below. Note that all commands are added to the global namespace.
Encodings
The encoding commands either take some data and return the same data in encoded form, or take encoded data and return a decoded
result.
[1] oct
[2] hex
[3] oct
[4] base64
[5] uuencode
[6] ascii85
[7] otp_words
[8] quoted-printable
Message Digests
The second category are message digests in general, simple ones like crc, and cryptographically strong algorithms like md5.
[1] crc-zlib
[2] crc
[3] adler
[4] md2
[5] md5
[6] md5_otp
[7] sha
[8] sha1
[9] sha1_otp
[10] haval
[11] ripemd-160
[12] ripemd-128
Miscellaneous
At last a number of commands not readily placed into categories providing password crypting, general transformations, data compres-
sion, error correction and others.
[1] crypt
[2] md5crypt
[3] transform
[4] rs_ecc
[5] zip
[6] bz2
[7] unstack
SEE ALSO
adler, ascii85, base64, bz2, crc, crc-zlib, crypt, haval, hex, md2, md5, md5_otp, md5crypt, oct, otp_words, quoted-printable, ripemd-128,
ripemd-160, rs_ecc, sha, sha1, sha1_otp, transform, uuencode, zip
KEYWORDS
compression, encoding, error correction, message digest, transformation
COPYRIGHT
Copyright (c) 1996-2003, Andreas Kupries <andreas_kupries@users.sourceforge.net>
Trf transformer commands 2.1.3 trf-intro(3trf)