06-20-2016
Thanks a lot .. This loop worked after I initialized the OLDKEY variable.
But I am still not clear how the code is working and getting the result. I believe I understood the part where you are storing the key value in to $KEY on a -r result .. But not clear how the latest file is picked based on the seconds in the file.
It will be of great help if you can explain how the code is working.
Thank you
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear frnds
My requirement is as follows
-rw-r----- 1 f02 dd 109428250 May 18 14:02 Extracts_20070518104730.zip
-rw-r----- 1 f02 dd 109493187 May 21 13:30 Extracts_20070521091700.zip
-rw-r----- 1 f02 dd 109993058 May 23 14:14 Extracts_20070523085955.zip
-rw-r----- 1... (5 Replies)
Discussion started by: sureshg_sampat
5 Replies
2. Shell Programming and Scripting
Hi guys,
I have a directory in UNIX having files with the below format, i need to pickup the latest file having recent timestamp embedded on it, then need to rename it to a standard file name.
Below is the file format:
filename_yyyymmdd.csv, i need to pick the latest and move it with the... (1 Reply)
Discussion started by: kaushik25
1 Replies
3. AIX
Hi guys,
I have a directory in UNIX having files with the below format, i need to pickup the latest file having recent timestamp embedded on it, then need to rename it to a standard file name.
Below is the file format:
filename_yyyymmdd.csv, i need to pick the latest and move it with the... (2 Replies)
Discussion started by: kaushik25
2 Replies
4. Shell Programming and Scripting
hi all,
not sure if this has been posted b4 but i try to search but not valid.
this is my question:
when i do a ls -ltr there will be a list generated as follows:
-rw-r--r-- 1 root sys 923260 Jan 10 04:38 FilePolling.41025.083TL021.xml
-rw-r--r-- 1 root sys 1761337 Jan 10 04:40... (12 Replies)
Discussion started by: lweegp
12 Replies
5. UNIX for Dummies Questions & Answers
I have a few log files which get generated on a daily basis..So, I need to pick only the ones which get generated for that particular day.
-rw-r--r-- 1 staff 510732676 Apr 7 22:01 test.log040711
-rwxrwxrwx 1 staff 2147482545 Apr 7 21:30 test.log.2
-rwxrwxrwx 1 staff 2147482581 Apr 7 19:26... (43 Replies)
Discussion started by: win4luv
43 Replies
6. Shell Programming and Scripting
HI,
I have to write a unix script and need your help.
in my application where I have to invoke this script a varialble is there where the value comes in a variable . for example variable can be var=ABC
like this there will be any type of value in the vcariable.
there is a unix directory... (2 Replies)
Discussion started by: manish8484
2 Replies
7. Shell Programming and Scripting
Hi Friends,
Newbie to shell scripting. Currently i have used the below to sort data based on filenames and datestamp
$ printf '%s\n' *.dat* | sort -t. -k3,4
filename_1.dat.20120430.Z
filename_2.dat.20120430.Z
filename_3.dat.20120430.Z
filename_1.dat.20120501.Z
filename_2.dat.20120501.Z... (1 Reply)
Discussion started by: robertbrown624
1 Replies
8. UNIX for Dummies Questions & Answers
Hi Friends,
Newbie to shell scripting
Currently i have used the below to sort data based on filenames and datestamp
$ printf '%s\n' *.dat* | sort -t. -k3,4
filename_1.dat.20120430.Z
filename_2.dat.20120430.Z
filename_3.dat.20120430.Z
filename_1.dat.20120501.Z
filename_2.dat.20120501.Z... (12 Replies)
Discussion started by: robertbrown624
12 Replies
9. Shell Programming and Scripting
Hi,
I have a file which generate Timestamp in this format :-
20121012162354
20121114191610
20121210232808
20121216220002
20130106220002
20130127220001
20130203220001
20121012162354
20121114191610
20121210232808
20121216220002
20130106220002
20130127220001
20130203220001 (2 Replies)
Discussion started by: netdbaind
2 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
I have list of files like below with name abcxyz.timestamp. I need a unix command to pick the latest file from the list of below files. Here in this case the lates file is abcxyz.20190304103200. I have used this unix command "ls abcxyz*|tail -1" but i heard that it is not the appropriate... (2 Replies)
Discussion started by: rakeshp
2 Replies
crypt(1) General Commands Manual crypt(1)
Name
crypt - encode/decode (available only if the Encryption layered product is installed)
Syntax
crypt key < input.File > output.File
Description
This reference page describes software that is available only if the Encryption layered product is installed.
The command reads from the standard input and writes on the standard output. You must supply a key which selects a particular transforma-
tion. If no password is given, demands a key from the terminal and turns off printing while the key is being typed in. The command
encrypts and decrypts with the same key.
Files encrypted by are compatible with those treated by the ed, ex and vi editors in encryption mode.
The security of encrypted files depends on three factors: the fundamental method must be hard to solve, direct search of the key space must
be infeasible, and sneak paths by which keys or clear text can become visible must be minimized.
The command implements a one-rotor machine designed along the lines of the German Enigma, but with a 256-element rotor. Methods of attack
on such machines are known, but not widely; moreover the amount of work required is likely to be large.
The transformation of a key into the internal settings of the machine is deliberately designed to be expensive, for example, to take a sub-
stantial fraction of a second to compute. However, if keys are restricted to three lowercase letters, then encrypted files can be read by
expending only a substantial fraction of five minutes of machine time.
Since the key you choose is an argument to the command, it is potentially visible to users executing ps(1) or a derivative. To minimize
this possibility, destroys any record of the key immediately upon entry. The most vulnerable aspect of is the choice of keys and key secu-
rity.
Examples
The following examples use KEY as the key to encrypt and decrypt files. The first example encrypts the file naming the resulting encrypted
file The second example decrypts the file naming the resulting decrypted file The third example prints the encrypted file in clear text.
crypt KEY < plain.File > crypt.File
crypt KEY < crypt.File > decrypt.File
crypt KEY < crypt.File | pr
Files
for typed key
See Also
ed(1), ex(1), vi(1), xsend(1), crypt(3), makekey(8)
crypt(1)