Hi,
how can i do to show when i do with scrip list entris, or list specific entry, it show 2 lines when i specify the entry to search...¿?
i paste the script:
# Global variables
film=/opt/etc/film/film.txt
export film
confirm()
{
echo -en "$@"
read ans
ans=`echo $ans | tr... (0 Replies)
Hi,
I'm trying to figure out the best solution to the following problem, and I'm not
yet that much experienced like you. :-)
Basically I have to read a fairly large file, composed of "messages" , in order
to display all of them through an user interface (made with QT).
The messages that... (3 Replies)
I am new to Unix so will really appreciate if someone can guide me on this.
What I want to do is:
Step1: Read binary file - pick first 2 bytes, convert from hex to decimal. Read the next 3 bytes as well.
2 bytes will specify the number of bytes 'n' that I want to read and write... (1 Reply)
Hi,
i have doubt in read and write using bash shell script...
i will give the input file path and output file path in command line
ex : example.sh iputfile outpilepath
Here i need to read the input data then write that data to output file..
please give some example : (6 Replies)
Hi, I would like to read the specific data from file and write the data in the new file.
My data input is something like this..
<EXROP:R=TJ0311T;
ROUTE DATA
R ROUTE PARAMETERS
TJ0311T DETY=UPDR TTRANS=1 FNC=3
MA=628160955000
R=TJ0311D
... (3 Replies)
Output file template format
<input_file_name>a</input_file_name>
<total_length_size>b</total_length_size>
<log_10_length_size>c</log_10_length_size>
Input_file_1 (eg. sample.txt)
SDFSDGDGSFGRTREREYWW
Parameter:
a is equal to the input file name
b is equal to the total length of... (2 Replies)
I am working on a script to unfold data for each column from a specific line of data and write output in a single line.
Input data looks like this.
2011-09-26 INF UM_10 UserMana Starting synchronization for security domain
14:37:31 080 gementSe .
rvice
I... (2 Replies)
Hi
I am new to writing script and want to use a Bash Piped while-read and read from user input.
if something happens on server.log then do while loop or if something happend on user input then do while loop.
Pseudocode something like:
tail -n 3 -f server.log | while read serverline || read... (8 Replies)
Dear Friends,
I am looking for a shell script to merge input files into one file .. here is my idea:
1st paramter would be outfile file (all input files content)
read all input files and merge them to input param 1
ex: if I pass 6 file names to the script then 1st file name as output file... (4 Replies)
i have written my shell script in notepad however i am struggling to pass the data file to be read to the script the data file is of .txt format. My target is to run the shell script from the terminal and pass 3 arguments e.g. polg@DESKTOP-BVPDC5C:~/CS1420/coursework$ bash valsplit.sh input.txt... (11 Replies)
Discussion started by: Gurdza32
11 Replies
LEARN ABOUT PLAN9
encrypt
ENCRYPT(2) System Calls Manual ENCRYPT(2)NAME
encrypt, decrypt, netcrypt - DES encryption
SYNOPSIS
#include <u.h>
#include <libc.h>
int encrypt(void *key, void *data, int len)
int decrypt(void *key, void *data, int len)
int netcrypt(void *key, void *data)
DESCRIPTION
Encrypt and decrypt perform DES encryption and decryption. Key is an array of DESKEYLEN (defined as 7 in <auth.h>) bytes containing the
encryption key. Data is an array of len bytes; it must be at least 8 bytes long. The bytes are encrypted or decrypted in place.
The DES algorithm encrypts an individual 8 byte block of data. Encrypt uses the following method to encrypt data longer than 8 bytes. The
first 8 bytes are encrypted as usual. The last byte of the encrypted result is prefixed to the next 7 unencrypted bytes to make the next 8
bytes to encrypt. This is repeated until fewer than 7 bytes remain unencrypted. Any remaining unencrypted bytes are encrypted with enough
of the preceding encrypted bytes to make a full 8 byte block. Decrypt uses the inverse algorithm.
Netcrypt performs the same encryption as a SecureNet Key. Data points to an ASCII string of decimal digits with numeric value between 0
and 10000. These digits are copied into an 8 byte buffer with trailing binary zero fill and encrypted as one DES block. The first four
bytes are each formatted as two digit ASCII hexadecimal numbers, and the string is copied into data.
SOURCE
/sys/src/libc/port
DIAGNOSTICS
These routines return 1 if the data was encrypted, and 0 if the encryption fails. Encrypt and decrypt fail if the data passed is less than
8 bytes long. Netcrypt can fail if it is passed invalid data.
SEE ALSO securenet(8)BUGS
The source is not included in public distributions. The implementation is broken in a way that makes it unsuitable for anything but
authentication.
ENCRYPT(2)