Sponsored Content
Full Discussion: scripting with awk and sed
Top Forums Shell Programming and Scripting scripting with awk and sed Post 302084203 by shan2on on Wednesday 9th of August 2006 06:15:39 PM
Old 08-09-2006
ok... fair enough


What i am trying to do, is get a username from the person [assuming root] and based on a formatted output from awk

...

awk -F: '$3 > 100{ print $0 }' /etc/passwd

...

The user will then enter a username they wish to delete or lock out of the system.


Then that username entered by the superuser, will be appended to a flat file only for temporary use.

Now my question is, if i wish to remove that username from the flatfile, is there a way to do it if the superuser would to enter it through a different menu, lets say if they wish to undo what they previously did...

I hope that makes sense...

I can paste my whole script if needed, cause it works up to this point.


thanks in advance

~shan2on
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help on SED AWK in shell scripting

Hi, I have a script abc.sql which contains a word 'timestamp'. I have another script xyz.txt genrated everyweek, which has a new timestamp value every week. How do I replace the word 'timestamp' in script abc.sql with the value mentioned in the script xyz.txt, so that I can run the script... (3 Replies)
Discussion started by: kaushys
3 Replies

2. 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

3. UNIX for Dummies Questions & Answers

tr, sed, awk, cat or scripting

I need to change all Newline caracters (\12) to Fieldseparator(\34). tr -A '\12' '\34' <file1> file2 Replace all delete (\177) with Newline (\12) tr -A '\177' '\12' <file2> file3 Put the name of the file first in all rows. awk '{printf "%s\34%s\n", FILENAME,$0} file3 > file4 So far no... (6 Replies)
Discussion started by: MrKlint
6 Replies

4. Shell Programming and Scripting

sed or awk scripting help needed

hi all, for an example : df -k output shows: $ df -k Filesystem 1K-blocks Used Available Use% Mounted on /dev/cciss/c0d0p6 3099260 1117760 1824068 8% / /dev/cciss/c0d0p1 256666 18065 225349 8% /boot none 8219180 0 8219180 0% /dev/shm /dev/mapper/vglocal-home 1032088 245172 734488 26%... (7 Replies)
Discussion started by: raghur77
7 Replies

5. Shell Programming and Scripting

Scripting awk or sed or shell

input buff_1 abc satya_1 pvr_1 buff_2 def satya_1 pvr_1 buff_3 ghi satya_1 pvr_1 buff_4 jkl satya_1 pvr_1 required out put buff_1 abc satya_1 pvr_1 abc satya_1 buff_2 def satya_1 pvr_1 def satya_1 buff_3 ghi satya_1 pvr_1 ghi satya_1 (6 Replies)
Discussion started by: pvr_satya
6 Replies

6. Shell Programming and Scripting

Most vexing: Sed or Awk scripting for date conversion needed

Hi, I have some files being sent to me that have dates in them in this format: from 1/8/2011 15:14:20 and I need the dates in this format (mysql date format) To 2011-01-08 15:14:20 all I have so far is the regexp that detects the format: sed -r -e 's@\1/\2/\3\4\5\6]::$@do... (7 Replies)
Discussion started by: Astrocloud
7 Replies

7. Shell Programming and Scripting

Use case insensitive variable in ksh shell scripting using sed or awk

I am using a variable called $variable in a pattern search to print from a starting variable to a constant value. the variable search should be case in sensitive. i tired using Ip at the end in the below command. but in ksh it is not working. sed -n "/$variable/,/constant/p" file i also... (11 Replies)
Discussion started by: johnjs
11 Replies

8. Shell Programming and Scripting

Need help with awk and sed scripting

I need help with sed and awk scripts to search for Symmetrix ID=000090009902 and then grep its child disk devices associated to the dead paths and display them only, so that those dead devices can be removed. test01:/#powermt display dev=all Pseudo name=hdiskpower0 Symmetrix ID=000090009902... (4 Replies)
Discussion started by: aix_admin_007
4 Replies

9. Shell Programming and Scripting

Help shell scripting using awk or sed or other

I need to create a script to change a file depending of 3 conditions using a target as parameter... first condition <chamada> <numeroTerminalOriginador>CALLER</numeroTerminalOriginador> <imeiOriginador></imeiOriginador> <cgiPrimeiraErbOriginador></cgiPrimeiraErbOriginador>... (2 Replies)
Discussion started by: poulis
2 Replies

10. Shell Programming and Scripting

Working with strings (awk, sed, scripting, etc...)

Hi evrybody For those who are bored I suggest exercise for tail :) There is "csv" string: A,B,C,D,E,G Desired output: | (A) A | (A,B) B | (A,B,C) C | (A,B,C,D) D | (A,B,C,D,E) E | G There are no whitespace characters at the beginning and end of the line. (7 Replies)
Discussion started by: nezabudka
7 Replies
PAM_RADIUS(8)						    BSD System Manager's Manual 					     PAM_RADIUS(8)

NAME
pam_radius -- RADIUS PAM module SYNOPSIS
[service-name] module-type control-flag pam_radius [options] DESCRIPTION
The RADIUS service module for PAM provides authentication services based upon the RADIUS (Remote Authentication Dial In User Service) proto- col. The pam_radius module accepts these optional parameters: use_first_pass causes pam_radius to use a previously entered password instead of prompting for a new one. If no password has been entered then authentication fails. try_first_pass causes pam_radius to use a previously entered password, if one is available. If no password has been entered, pam_radius prompts for one as usual. echo_pass causes echoing to be left on if pam_radius prompts for a password. conf=pathname specifies a non-standard location for the RADIUS client configuration file (normally located in /etc/radius.conf). nas_id=identifier specifies a NAS identifier to send instead of the hostname. template_user=username specifies a user whose passwd(5) entry will be used as a template to create the session environment if the supplied username does not exist in the local password database. The user will be authenticated with the supplied username and password, but his cre- dentials to the system will be presented as the ones for username, i.e., his login class, home directory, resource limits, etc. will be set to ones defined for username. If this option is omitted, and there is no username in the system databases equal to the supplied one (as determined by call to getpwnam(3)), the authentication will fail. nas_ipaddr[=address] specifies a NAS IP address to be sent. If option is present, but there is no value provided then IP address corresponding to the current hostname will be used. FILES
/etc/radius.conf The standard RADIUS client configuration file for pam_radius SEE ALSO
passwd(5), radius.conf(5), pam(8) HISTORY
The pam_radius module first appeared in FreeBSD 3.1. The pam_radius manual page first appeared in FreeBSD 3.3. AUTHORS
The pam_radius manual page was written by Andrzej Bialecki <abial@FreeBSD.org>. The pam_radius module was written by John D. Polstra <jdp@FreeBSD.org>. BSD
October 28, 2002 BSD
All times are GMT -4. The time now is 10:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy