Sponsored Content
Full Discussion: Process all file
Top Forums Shell Programming and Scripting Process all file Post 302137085 by nazri76 on Saturday 22nd of September 2007 01:27:09 AM
Old 09-22-2007
Process all file

I have several file in the directory. I try to run a encrypt script but one file processed only.

Code:
data_files='Ma*.txt'

for file in $data_files

do

    java Encrypt key.txt $data_files

done

How i can process all the file?
 

9 More Discussions You Might Find Interesting

1. Programming

process on file

Hello, I need to write this C program: MyProgram <user> that write on myfile.txt file all <users> 'process. MyProgram must call the ps -u <user> command, but with an exec or with a system? can any one help me? Thank you (0 Replies)
Discussion started by: FastMagister
0 Replies

2. AIX

process the old file first

hello i have direcotry in which i will be getting a number of input files with different names and i need to write a script where i need to process the older file first and then come out of the loop. can any one throw some light appreciate (2 Replies)
Discussion started by: dsdev_123
2 Replies

3. Shell Programming and Scripting

Read from file > process > output to file

Hi all, OK, I am totally new to shell scripting as I just started today. All I want from shell scripting is something very basic, and I've been searching for tutorials on "processing files" and I could not find a suitable one for my level. I want to read two columns from a data file, one raw... (3 Replies)
Discussion started by: Lorna
3 Replies

4. Shell Programming and Scripting

Check if file is loaded completely and then process the file

I need to write a script which checks for files loaded into a folder (files are loaded by ftp from other server) and process the file only if the file is loaded completely. if the file is not complete in the current run, it must be processed in the next run. Any suggestions would be welcome... (2 Replies)
Discussion started by: kalyan381
2 Replies

5. Shell Programming and Scripting

awk: process file

Hello, i have a file as below: ... AAA: 1 BBB: 2 CCC: 3 AAA: 11 BBB: 22 CCC: 33 AAA: 111 BBB: 222 CCC: 333 .... how to process it by using AWK to this: (AAA BBB CCC) .... 1 11 111 2 22 222 3 33 333 (2 Replies)
Discussion started by: 0916981
2 Replies

6. Shell Programming and Scripting

SFTP Process each File!

Hi All, I'm a newbie here in unix. I'm just wondering how can i process each file while in sftp? is it possible? Ex. server1 1.txt 2.txt how can i get the top of the file and process it. output: 1.txt is going to process because it's in the top. i can't figure out how to do it. T_T... (9 Replies)
Discussion started by: nikki1200
9 Replies

7. UNIX for Advanced & Expert Users

How to copy a binary file while the file is being written to by another process

Hello, Can I copy a binary file while the file is being written to by another process? Another process (program) “P1” creates and opens (for writing) binary file “ABC” on local disk. Process P1 continuously write into ABC file every couple of seconds, adding 512-byte blocks of data. ABC file... (1 Reply)
Discussion started by: mbuki
1 Replies

8. Shell Programming and Scripting

Ksh: How to write the log file simultaneously when .sql file executes by UNIX process

Hello Team- we would like to implement an approach which has to write the log file simultaneously when .sql file is executing by Unix process. At present,it is writing the log file once the process is completed. I've tested the current process with the below approaches and none of them... (1 Reply)
Discussion started by: Hima_B
1 Replies

9. Shell Programming and Scripting

Monitoring processes in parallel and process log file after process exits

I am writing a script to kick off a process to gather logs on multiple nodes in parallel using "&". These processes create individual log files. Which I would like to filter and convert in CSV format after they are complete. I am facing following issues: 1. Monitor all Processes parallelly.... (5 Replies)
Discussion started by: shunya
5 Replies
ENCRYPT(3)						     Linux Programmer's Manual							ENCRYPT(3)

NAME
encrypt, setkey, encrypt_r, setkey_r - encrypt 64-bit messages SYNOPSIS
#define _XOPEN_SOURCE #include <unistd.h> void encrypt(char block[64], int edflag); #define _XOPEN_SOURCE #include <stdlib.h> void setkey(const char *key); #define _GNU_SOURCE #include <crypt.h> void setkey_r(const char *key, struct crypt_data *data); void encrypt_r(char *block, int edflag, struct crypt_data *data); Each of these requires linking with -lcrypt. DESCRIPTION
These functions encrypt and decrypt 64-bit messages. The setkey() function sets the key used by encrypt(). The key argument used here is an array of 64 bytes, each of which has numerical value 1 or 0. The bytes key[n] where n=8*i-1 are ignored, so that the effective key length is 56 bits. The encrypt() function modifies the passed buffer, encoding if edflag is 0, and decoding if 1 is being passed. Like the key argument, also block is a bit vector representation of the actual value that is encoded. The result is returned in that same vector. These two functions are not reentrant, that is, the key data is kept in static storage. The functions setkey_r() and encrypt_r() are the reentrant versions. They use the following structure to hold the key data: struct crypt_data { char keysched[16 * 8]; char sb0[32768]; char sb1[32768]; char sb2[32768]; char sb3[32768]; char crypt_3_buf[14]; char current_salt[2]; long int current_saltbits; int direction; int initialized; }; Before calling setkey_r() set data->initialized to zero. RETURN VALUE
These functions do not return any value. ERRORS
Set errno to zero before calling the above functions. On success, it is unchanged. ENOSYS The function is not provided. (For example because of former USA export restrictions.) CONFORMING TO
The functions encrypt() and setkey() conform to SVr4, SUSv2, and POSIX.1-2001. The functions encrypt_r() and setkey_r() are GNU exten- sions. NOTES
In glibc 2.2 these functions use the DES algorithm. EXAMPLE
You need to link with libcrypt to compile this example with glibc. To do useful work the key[] and txt[] arrays must be filled with a use- ful bit pattern. #define _XOPEN_SOURCE #include <unistd.h> #include <stdlib.h> int main(void) { char key[64]; /* bit pattern for key */ char txt[64]; /* bit pattern for messages */ setkey(key); encrypt(txt, 0); /* encode */ encrypt(txt, 1); /* decode */ } SEE ALSO
cbc_crypt(3), crypt(3), ecb_crypt(3), feature_test_macros(7) COLOPHON
This page is part of release 3.25 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. 2003-04-04 ENCRYPT(3)
All times are GMT -4. The time now is 12:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy