09-29-2008
What about pr command, it can do columns (I used it a lot in my early days...)
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hai
Please let me know the command in unix(command mode ) from a file that deletes the whole column (not 1st and last column )& replace with numbers starting from 1.
Regards
suneetha. (8 Replies)
Discussion started by: gaddesuneetha
8 Replies
2. UNIX for Advanced & Expert Users
Hi All,
Can anyone tell me how to sort data in a file using the “sort” command? Note that the records in the data file are not separated into fields. I know only the column positions of the data on which sorting should be done. For example say I've to sort based on the data present in between... (1 Reply)
Discussion started by: swat
1 Replies
3. Shell Programming and Scripting
Hi, Iam new to unix. I have one input file .
Input file :
ID1~Name1~Place1
ID2~Name2~Place2
ID3~Name3~Place3
I need output such that only first column should change to fixed width column of 15 characters of length.
Output File:
ID1<<12 spaces>>Name1~Place1
ID2<<12... (5 Replies)
Discussion started by: manneni prakash
5 Replies
4. Shell Programming and Scripting
Match column 3 in file1 to column 1 in file 2 and replace with column 2 from file2
file 1 sample
SNDK 80004C101 AT
XLNX 983919101 BB
NETL 64118B100 BS
AMD 007903107 CC
KLAC 482480100 DC
TER 880770102 KATS
ATHR 04743P108 KATS... (7 Replies)
Discussion started by: rydz00
7 Replies
5. Shell Programming and Scripting
Hello all,
I have a file with below content.Its basically huge file but listing few of the content
A0|SAL |bN |g10 | |20100611|G|1
M0|AL |bN |g10 | |20100611|K|2
n0|L |bN |g10 | |20100611|V|4... (5 Replies)
Discussion started by: j_panky
5 Replies
6. Shell Programming and Scripting
Hello,
I have 2 columns (1st column has multiple entries but the corresponding values in the column 2 may be the same or different.) however I want to extract unique values for each entry in column 1 by assigning the max value from column 2
SDF4 -0.211654
SDF4 0.978068
... (1 Reply)
Discussion started by: Diya123
1 Replies
7. UNIX for Dummies Questions & Answers
Dear Gurus,
I have a unix file 2 columns (# delimited) with the following data:
ZTXX_CTBR1-ZBRAN1#ZTXX_CTBR1-ZBRAN_DESC#
01#CASH & CARRY#
02#DRUGSTORE - RX#
04#SUPERMARKET#
05#HYPERMARKET#
17#DRUGSTORE - NO RX#
I would like to have a code that will do 2 things:
1. Delete the header... (16 Replies)
Discussion started by: chumsky
16 Replies
8. UNIX for Dummies Questions & Answers
I have a flat file with the 3 columns and separate by tab delimiter, and the last column with special character.
A B
C D
F G
Now I would like to swap the third column with second column to following format:
A B
C D
F G
I know this cannot be done in Unix command with using cut... (3 Replies)
Discussion started by: newbie2011
3 Replies
9. UNIX for Advanced & Expert Users
Hi All,
I have a fixedwidth file of length 3000. Now i want to copy a column of 4 chars i.e( length 1678-1681) to column 1127 – 1171 to the same file.
Please let me know how can i achive using a single command in fixed width file.
Also source column length is 4 chars and target column length... (4 Replies)
Discussion started by: kiranparsha
4 Replies
10. UNIX for Beginners Questions & Answers
Hello Team,
My source data (INput) is like below
EPIC1 router EPIC2 Targetdefinition
Exp1 Expres rtr1 Router
SQL SrcQual Exp1 Expres
rtr1 Router EPIC1 Targetdefinition
My output like
SQL SrcQual Exp1 Expres
Exp1 Expres rtr1 Router
rtr1 Router EPIC1 Targetdefinition... (5 Replies)
Discussion started by: sekhar.lsb
5 Replies
shadow(4) Kernel Interfaces Manual shadow(4)
NAME
shadow - shadow password file
SYNOPSIS
DESCRIPTION
The file is created from the file by the command. It is readable only by a privileged user. It can be modified by the and commands. Pro-
grams may use the interfaces described in the getspent(3C) manpage to access this information. These functions return a pointer to an
structure, which is defined in the header file.
Fields
The file is an ASCII file consisting of any number of user entries separated by newlines. Each user entry line consists of the following
fields separated by colons:
login name Each login name must match a login name in puts the user entries in in the same order as the entries.
encrypted password
The password field of each entry contains an "x", and the actual encrypted passwords reside in The encrypted password field
consists of 13 characters chosen from a 64-character set of "digits". The characters used to represent "digits" are for 0,
for 1, through for 2 through 11, through for 12 through 37, and through for 38 through 63.
If the SHA11i3 product is installed, the password field may contain the prefix , where n is a label identifying an alterna-
tive algorithm used for the password hash. Using the new algorithm results in an encrypted password field which is longer
than 13 characters. The password field will consist of digits from the same 64-character set, as well as the additional
character used as a delimiter.
If this field is null, then there is no password and no password is demanded on login. Login can be prevented by entering a
character that is not a part of the set of digits (such as *).
last change
The number of days since January 1, 1970 that the password was last modified.
min days
The minimum period in days that must expire before the password can be changed. See also in security(4) and the command in
passwd(1).
max days
The maximum number of days for which a password is valid. A user who attempts to login after his password has expired is
forced to supply a new one. If min days and max days are both zero, the user is forced to change his password the next time
he logs in. If min days is greater than max days, then the password cannot be changed. These restrictions do not apply to
the superuser. See also in security(4) and the command in passwd(1).
warn days
The number of days the user is warned before his password expires. See also in security(4) and the command in passwd(1).
inactivity
The maximum number of days of inactivity allowed. This field is set with the option of either the or command. If this value
is greater than zero, then the account is locked if there have been no logins to the account for at least the specified num-
ber of days. If this value is less than or equal to zero, the value is determined by the attribute. See the description of
in security(4).
expiration
The absolute number of days since Jan 1, 1970 after which the account is no longer valid. A value of zero in this field
indicates that the account is locked.
reserved
The reserved field is always zero and is reserved for future use.
Notes
The file is not applicable to a system which has been converted to a trusted system.
WARNINGS
HP-UX 11i Version 3 is the last release to support trusted systems functionality.
FILES
system password file
shadow password file
SEE ALSO
login(1), passwd(1), pwconv(1M), pwunconv(1M), useradd(1M), userdel(1M), usermod(1M), crypt(3C), getspent(3C), putspent(3C), nss-
witch.conf(4), passwd(4), security(4).
shadow(4)