Sponsored Content
Full Discussion: need a help reg -d in shell
Top Forums Shell Programming and Scripting need a help reg -d in shell Post 302176841 by frajer on Wednesday 19th of March 2008 09:43:01 AM
Old 03-19-2008
Code:
date "+%m" | awk '{if($1==01){print 12}else{print $1-1}}'

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Awk - Using a Shell Variable in the Reg Expression

Hi all, I have a shell variable $test1 that holds a value derived from some other processing. What I need to do is use that $test1 as the input to a awk regular expression: nawk -F"," -v tester=$test1 ' /tester/{ print $0 } ' $inputFile So what I have is tester... (6 Replies)
Discussion started by: not4google
6 Replies

2. Shell Programming and Scripting

Reg: Shell script ran using informatica

Hi all, I am not sure whether this is the right place to ask this question...:) I am working in Informatica PowerCenter 8.1.1 tool and my server is on UNIX. I have got a shell script to copy files from one folder to another. When I run the script directly from UNIX prompt it is taking 60... (0 Replies)
Discussion started by: sam99
0 Replies

3. Shell Programming and Scripting

Reg: Gzip

Hi , I want gzip a folder te55 which has got 3 files test1.test2,test3 the name of the gzipped folder should be te55.gz with the 3 files as test1,test2,test3 itself... Is it possible... thanks in advance sam (5 Replies)
Discussion started by: sam99
5 Replies

4. Shell Programming and Scripting

usage...sed/awk/reg-exp ..in shell scripting

in shell scripting there is extensive usage of i> regular expression ii>sed iii>awk can anyone tell me the suitable contexts ...i mean which one is suitable for what kind of operation. like the reg-exp and sed seems to be doing the same job..i.e pattern matching (1 Reply)
Discussion started by: mobydick
1 Replies

5. Shell Programming and Scripting

Reg sftp in shell script

Hi, I want to retrieve files from an sftp site and place it a directory in unix server. When I try to connect, it is asking password even if i hardcode it in the script.I want to automate the script. Could anyone tell me how to avoid password prompt. #!/bin/sh # sample automatic ftp script... (3 Replies)
Discussion started by: vidhya_vec
3 Replies

6. UNIX for Dummies Questions & Answers

Reg: MAILX

Hi all, I am trying to send a mail by using MAILX option to my YAHOO-Id. It is giving the following error. Can any one help me to find what is the problem? Do i need to get any kind of settings in my UNIX box for using MAILX? The bounce mail is as below: Message 1: From MAILER-DAEMON Tue... (2 Replies)
Discussion started by: Raamc
2 Replies

7. Solaris

Reg. VXVM

Hi Guys, I have a doubt either to Reboot the server after Replacing the disk0. I have two disks under vxvm root mirrored and i had a problem with primary disk so i replace the disk0 failed primary disk and then mirrored. After mirroring is it reboot required ? (7 Replies)
Discussion started by: kurva
7 Replies

8. Shell Programming and Scripting

Reg: SHELL scripting

Hi All, I am Lucky, newly joined the group. I am very new to unix, can any one provide me good PDF's on shell scirpting to learn quickly. Thanks in Advance, Lucky (3 Replies)
Discussion started by: me_lucky
3 Replies

9. Shell Programming and Scripting

Reg expressions

Hi, I would like to grep for a string within a tag, can someone provide some assistance in how to do it? So I would like to use the grep command to find a string like: <tag>sometext<tag> because the sometext can be any number of characters or an type of number or lettering, what expression... (1 Reply)
Discussion started by: cyberfrog
1 Replies

10. Shell Programming and Scripting

Reg: Certification on Shell Scripting

Hi all, Please let me know whether any certifications are there for Shell Scripting. (Not Brainbench). If any one know pls post the details. Thanks in advnce.. (1 Reply)
Discussion started by: divya bandipotu
1 Replies
CHPASS(1)						      General Commands Manual							 CHPASS(1)

NAME
chpass - add or change user database information SYNOPSIS
chpass [ -a list ] [ user ] DESCRIPTION
Chpass allows editing of the user database information associated with user or, by default, the current user. The information is formatted and supplied to an editor for changes. The vi editor will be used unless the environmental variable EDITOR selects an alternate editor. When the editor terminates, the information is re-read and used to update the user database itself. Only the user, or the super-user, may edit the information associated with the user. Only the information that the user is allowed to change is displayed. Possible display items are as follows: Login: user's login name Password: user's encrypted password Uid: user's id Gid: user's login group id Change: password change time Expire: account expiration time Class: user's general classification Home Directory: user's home directory Shell: user's login shell Full Name: user's real name Location: user's normal location Home Phone: user's home phone Office Phone: user's office phone The login field is the user name used to access the computer account. The password field contains the encrypted form of the user's password. The uid field is the number associated with the login field. Both of these fields should be unique across the system (and often across a group of systems) as they control file access. While it is possible to have multiple entries with identical login names and/or identical user id's, it is usually a mistake to do so. Routines that manipulate these files will often return only one of the multiple entries, and that one by random selection. The group field is the group that the user will be placed in upon login. Since this system supports multiple groups (see groups(1)) this field currently has little special meaning. This field may be filled in with either a number or a group name (see group(5)). The change field is the date by which the password must be changed. The expire field is the date on which the account expires. Both the change and expire fields should be entered in the form ``month day year'' where month is the month name (the first three charac- ters are sufficient), day is the day of the month, and year is the year. The class field is currently unused. In the near future it will be a key to a termcap(5) style database of user attributes. The user's home directory is the full UNIX path name where the user will be placed on login. The shell field is the command interpreter the user prefers. If the shell field is empty, the Bourne shell (/bin/sh) is assumed. When altering a login shell, and not the super-user, the user must select an approved shell from the list in /etc/shells. The last four fields are for storing the user's full name, office location, and home and work telephone numbers. The super-user is also allowed to directly supply a user database entry, in the format specified by passwd(5), as an argument to the -a option. This argument must be a colon (``:'') separated list of all the user database fields, although they may be empty. Once the information has been verified, chpass uses mkpasswd(8) to update the user database. This is run in the background, and, at very large sites could take several minutes. Until this update is completed, the password file is unavailable for other updates and the new information will not be available to programs. FILES
/etc/master.passwd The user database /etc/shells The list of approved shells SEE ALSO
login(1), finger(1), getusershell(3), passwd(5), mkpasswd(8), vipw(8) Robert Morris and Ken Thompson, UNIX password security BUGS
User information should (and eventually will) be stored elsewhere. 4th Berkeley Distribution March 12, 1989 CHPASS(1)
All times are GMT -4. The time now is 04:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy