Sponsored Content
Top Forums Shell Programming and Scripting Problem with output awk and sed Post 302885286 by Perderabo on Friday 24th of January 2014 12:15:16 PM
Old 01-24-2014
^@ is a null. The original file is 16 bits per character. When viewed on an 8 bits per character system the nulls do not show up. I had a file like that once. My file had been created on Windows.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

using awk or sed to print output from one file

dear i have one file regarding >abshabja>sdksjbs>sknakna>snajxcls so i want to be output like >abshabja >sjkabjb >sknakna >snajxcls Any using awk or sed will help thanks (2 Replies)
Discussion started by: cdfd123
2 Replies

2. Shell Programming and Scripting

Awk & sed query for output

Hello, I have a file. its content are like below. mdn:87439842 imsi:23082038203 Ctime:12082010 01:20:10 mdn:9324783783 imsi:402349823322 Ctime: 12072010 01:20:10 mdn:87439842 imsi:23082038203 Ctime: 23072010 01:20:10 mdn:87439842 imsi:23082038203 Ctime:18072010 01:20:10 mdn:87439842... (3 Replies)
Discussion started by: Sanket11
3 Replies

3. UNIX for Dummies Questions & Answers

awk output problem

Hi Gurus, I have a file which has some fields separated with multiple spaces or single space. data 1 2 3 4 5 6 4 5 5 7 7 8 9 4 6 10 and so on..... The problem I am facing is the output of the awk program... (2 Replies)
Discussion started by: sanjay.login
2 Replies

4. UNIX for Advanced & Expert Users

Using awk or sed need the output in the new file

Please find the input file as given below: 2012/02/29 11:00:00~~CRITICAL~For customer 00000476 no daily files were found in the 010137933 account directory. 2012/02/29 11:00:00~~CRITICAL~For customer 05006802 no daily files were found in the 010115166 account directory. 2012/02/29... (0 Replies)
Discussion started by: av_sagar
0 Replies

5. UNIX for Dummies Questions & Answers

Appending columns at the end of output using awk/sed

Hi , I have the below ouput, =====gopi===== assasassaa adsadsadsdsada asdsadsadasdsa sadasdsadsd =====kannan=== asdasdasd sadasddsaasd adasdd =====hbk=== asasasssa .... .. I want the output like as below, not able paste here correctly. (2 Replies)
Discussion started by: eeegopikannan
2 Replies

6. Shell Programming and Scripting

need awk or sed help to reformat output

We have the following output: server1_J00_data_20120711122243 server1_J00_igs_20120711122243 server1_J00_j2ee_20120711122243 server1_J00_sec_20120711122243 server1_J00_data_20120711131819 server1_J00_igs_20120711131819 server1_J00_j2ee_20120711131819 server2_J00_data_20120711122245... (10 Replies)
Discussion started by: ux4me
10 Replies

7. Shell Programming and Scripting

Pipe awk's output to sed for deletion

Hi Friends, I am using a command that prints certain lines from a file. For ex: cat input abc chr1 456 def chr1 789 ghi chr1 999 jjj chr1 777 jhk chr7 914 My command awk '{if($2=="chr1" && $3>=456 && $3<=999) {print $0}}' OFS="\t" input Output being printed is abc chr1 456 (7 Replies)
Discussion started by: jacobs.smith
7 Replies

8. Shell Programming and Scripting

Use of awk/sed to filter out fdisk output

Hi , I am trying to filter out the below output of fdisk -l command : fdisk -l Disk /dev/sda: 42.9 GB, 42949672960 bytes 255 heads, 63 sectors/track, 5221 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 ... (9 Replies)
Discussion started by: omkar.jadhav
9 Replies

9. Shell Programming and Scripting

Output on one line using awk or sed

I have a file of 100,000 lines in the below format: answer.bed chr1 957570 957852 NOC2L chr1 976034 976270 PERM1 chr1 976542 976787 PERM1 I need to get each on one line and so far what I have tried doesn't seem to be working. Thank you... (3 Replies)
Discussion started by: cmccabe
3 Replies

10. Shell Programming and Scripting

Problem in formatting output in sed / awk

I have a file like this : ! 1 ! 542255 ! 50,140.00 ! ! 2 ! 551717 ! 5,805.00 ! ! 3 ! 551763 ! 8,130.00 ! ! 4 ! 551779 ! 750.00 ! ! 5 ! 551810 ! 56,580.00 ! ! 6 ! 551816 ! 1,350.00 ! ! 7 ! 551876 ! 360.00 ! ! 8 ! 551898 ! ... (10 Replies)
Discussion started by: adam1969in
10 Replies
CRYPT(3)						   BSD Library Functions Manual 						  CRYPT(3)

NAME
crypt, encrypt, setkey -- DES encryption SYNOPSIS
#include <unistd.h> char * crypt(const char *key, const char *salt); void encrypt(char *block, int edflag); #include <stdlib.h> void setkey(const char *key); DESCRIPTION
The crypt() function performs password encryption, based on the NBS Data Encryption Standard (DES). Additional code has been added to deter key search attempts. The first argument to crypt() is a null-terminated string, typically a user's typed password. The second is in one of two forms: if it begins with an underscore (``_''), an extended format is used in interpreting both the key and the salt value, as outlined below. Extended crypt: The key is divided into groups of 8 characters (the last group is null-padded) and the low-order 7 bits of each each character (56 bits per group) are used to form the DES key as follows: the first group of 56 bits becomes the initial DES key. For each additional group, the XOR of the encryption of the current DES key with itself and the group bits becomes the next DES key. The salt is a 9-character array consisting of an underscore, followed by 4 bytes of iteration count and 4 bytes of salt. These are encoded as printable characters, 6 bits per character, least significant character first. The values 0 to 63 are encoded as ``./0-9A-Za-z''. This allows 24 bits for both count and salt. Traditional crypt: The first 8 bytes of the key are null-padded, and the low-order 7 bits of each character is used to form the 56-bit DES key. The salt is a 2-character array of the ASCII-encoded salt. Thus, only 12 bits of salt are used. count is set to 25. Algorithm: The salt introduces disorder in the DES algorithm in one of 16777216 or 4096 possible ways (ie. with 24 or 12 bits: if bit i of the salt is set, then bits i and i+24 are swapped in the DES E-box output). The DES key is used to encrypt a 64-bit constant, using count iterations of DES. The value returned is a null-terminated string, 20 or 13 bytes (plus null) in length, consisting of the salt, followed by the encoded 64-bit encryption. The functions, encrypt() and setkey() provide access to the DES algorithm itself. setkey() is passed a 64-byte array of binary values (numeric 0 or 1). A 56-bit key is extracted from this array by dividing the array into groups of 8 and ignoring the last bit in each group. That bit is reserved for a byte parity check by DES, but is ignored by these functions. The block argument to encrypt() is also a 64-byte array of binary values. If the value of edflag is 0, block is encrypted; otherwise, it is decrypted. The result is returned in the original array block, after using the key specified by setkey() to process it. The function crypt() returns a pointer to the encrypted value on success, and NULL on failure. The crypt() and setkey() functions all manipulate the same key space. SEE ALSO
login(1), passwd(1), getpass(3), compat(5), passwd(5) LEGACY SYNOPSIS
#include <unistd.h> int encrypt(char *block, int edflag); The function encrypt() returns 0 on success and 1 on failure. void setkey(const char *key); The include file <unistd.h> is necessary and sufficient for the setkey() function. BUGS
The crypt() function returns a pointer to static data, and subsequent calls to crypt() will modify the same object. HISTORY
A rotor-based crypt() function appeared in Version 6 AT&T UNIX. The current style crypt() first appeared in Version 7 AT&T UNIX. This library (FreeSec 1.0) was developed outside the United States of America as an unencumbered replacement for the U.S.-only libcrypt encryption library. Programs linked against the crypt() interface may be exported from the U.S.A. only if they use crypt() solely for authentication purposes and avoid use of the other programmer interfaces listed above. Special care has been taken in the library so that programs which only use the crypt() interface do not pull in the other components. AUTHOR
David Burren <davidb@werj.com.au> FreeSec 1.0 March 9, 1994 FreeSec 1.0
All times are GMT -4. The time now is 02:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy