Sponsored Content
Top Forums Shell Programming and Scripting How to filter date input in awk? Post 302765605 by commonwealth on Saturday 2nd of February 2013 10:44:54 PM
Old 02-02-2013
Thank you so much for the replies.

I've tried out the code given.
I wanted print any line that matches $userid and matches $datte.
So far when I try enter $userid it can filter but when I enter $datte e.g. 03022013 nothing comes out.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell Script for searching files with date as filter

Hi , Assume today's date is 10-May-2002. I want to get a list of files which were last modified since 01-May-2002. If I run the script after 5 days, it should still list me the files modified from 01-May-2002 till today. I also plan to pass the date 01-May-2002 as an argument to the shell script... (3 Replies)
Discussion started by: kanakaraj_s
3 Replies

2. UNIX for Dummies Questions & Answers

ftp by date filter

i would be grateful if someone could supply me with a shell script which performed a ftp but only retrieved files which had a created date greater than a specific date - is this possible with ftp? many thanks mc (1 Reply)
Discussion started by: campbem
1 Replies

3. Shell Programming and Scripting

Filter by modify date.

I want to filter an "ls -al" command so it only shows me files with modify dates older than two weeks. What is the best way of doing this? (2 Replies)
Discussion started by: millerdc
2 Replies

4. Shell Programming and Scripting

filter input & outputs to another file

Hello All, I am stuck with the follwing problem , pls give me some advice.. Input file: input clock; input reset; \\reset all input yuv; //input comment output sur; output sud; output vtua; output tur; input ebi; //output comment The input file... (1 Reply)
Discussion started by: user_prady
1 Replies

5. Shell Programming and Scripting

how to filter file for specific date

Hi My OS is solaris 64 bit 10, I have many files in a logs directory where we recive 40-50 logs every day. i have last 20 days file present in this directory. I want to move each day file to a particulaar directory whose name is appended with the date of file. eg Code: 1.txt file... (1 Reply)
Discussion started by: guddu_12
1 Replies

6. Shell Programming and Scripting

Script to filter by date

Hello, I currently have the need to perform backup, naming the file by date. How do I get the script, you can choose the most current file or current date and then upload it? My script is related to this topic that is already closed. Read Post Can anyone help me? (12 Replies)
Discussion started by: hdegenaro
12 Replies

7. Shell Programming and Scripting

Date capture & filter

Dear All, I am capturing system date and creating the file by using that time stamp, file is getting appended with checks of application & database check logs. But when the date is in between 1 to 9 both inclusive, it appends a single space to file name but after 9th it works fine. ... (5 Replies)
Discussion started by: pradeep84in
5 Replies

8. Shell Programming and Scripting

How-To Check & Filter user input

Hi, On my Java webpage which invokes the shell script has two checkboxes viz ... apache and weblogic apache require one parameter i.e apache home from the user while Weblogic requires three or five params from the user vi.z weblogic_home or <jdk_home, config_home & pid>, username and... (4 Replies)
Discussion started by: mohtashims
4 Replies

9. Shell Programming and Scripting

Script to get previous date for the given input date..

hi all, need a script or command to get the previous date for the given input date... like in my script i will pass date as input parameter like 2014-12-01 and i want the output as previous date.. ie.. 2014-11-30 (2 Replies)
Discussion started by: hemanthsaikumar
2 Replies

10. Linux

Filter log file contents between date

Hi, Could you please provide me command to filter contents between date in a log file? Say for example, in a log file I want to capture contents between date May 01 from 5am to 9 am. OS -- Linux Regards, Maddy (1 Reply)
Discussion started by: Maddy123
1 Replies
PTHREAD_SETUGID_NP(2)					      BSD System Calls Manual					     PTHREAD_SETUGID_NP(2)

NAME
pthread_setugid_np -- Set the per-thread userid and single groupid. SYNOPSIS
#include <sys/types.h> #include <sys/unistd.h> int pthread_setugid_np(uid_t uid, gid_t gid); DESCRIPTION
pthread_setugid_np() changes the current thread's effective, real, and saved userid and groupid to the requested userid and groupid ( uid and gid , respectively) and clears all other groupids. uid can be the current real userid, KAUTH_UID_NONE, or, if the caller is privileged, any userid. gid can be the current real groupid or, if the caller is priviledged, any single groupid. Setting uid to KAUTH_UID_NONE means to "revert to the per process credential". CAVEATS
Temporarily restoring root privileges for a non-privileged process is only possible on a per-process basis and not a per-thread basis. pthread_setugid_np() is not intended as a privilege escalation mechanism. Do not use pthread_setugid_np.2() in a security sensitive situation. RETURN VALUES
Upon successful completion, a value of 0 is returned. Otherwise, -1 is returned and the global variable errno is set to indicate the error. ERRORS
pthread_setugid_np() fails if one or more of the following are true: [EPERM] The calling process does not have the correct credentials to set the override identity (i.e. The current credentials do not imply "super-user"). [EPERM] If uid is set to KAUTH_UID_NONE, the current thread must already be assuming another identity in order to revert back. [EPERM] The current thread cannot already be assuming another identity. SEE ALSO
setuid(2) setgid(2) seteuid(2) setegid(2) BSD
October 1, 2008 BSD
All times are GMT -4. The time now is 11:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy