04-30-2010
File Processing in Shell Script
Hi all ,
Thanks for your replys ...
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a shell script that runs all the time looking for a certain type of file and then it processes the file through a series of other scripts. The script is watching a directory that has files uploaded to it via SFTP. It already checks the size of the file to make sure that it is not still... (3 Replies)
Discussion started by: heprox
3 Replies
2. Shell Programming and Scripting
Hi I am trying to create a shell script that will
look for a contracthead file first and if the contract head file does not exist on day1 exit script.
Now on day2 if contracthead exists or not run the script uploading files in order
such as contract line then contract contact
so the... (2 Replies)
Discussion started by: jonathan184
2 Replies
3. Shell Programming and Scripting
I have a file which is having enrties like
entry-id 1
ABC : value
DEF :value
GHI :VALUE
entry-id 2
ABC : value
DEF :value
GHI :VALUE
entry-id 2
ABC : value
DEF :value
GHI :VALUE
and so on .. .wht i want to do is (1 Reply)
Discussion started by: msbinu
1 Replies
4. Shell Programming and Scripting
Hi All,
I am new to Shell scripting.
I have a log file containing XML Messages.Each XML Message is accompanied with a timestamp.I need to count the the number of messages that get logged in a particular timeinterval.Is there any command/Syntax to achieve this.
Any code/example is... (5 Replies)
Discussion started by: vignesh53
5 Replies
5. Shell Programming and Scripting
I want to use an awk for the following scenario but not sure if it will work or not. I have two input file: F1 and F2
F1
02
05
08
F2
00
01
02
03
04
05
06
07
08
09
10 (1 Reply)
Discussion started by: jclanc8
1 Replies
6. Shell Programming and Scripting
Hi,
My objective is to make a shell script that, when run, you can input multiple links at once.
text is then inserted between the http:// part and the following url.
example : http://google.be ==> http://sometext.google.be
it would be great if it could then open all the created links (wich... (5 Replies)
Discussion started by: tooster
5 Replies
7. Programming
Hello,
I extracted a list of files in a directory with the command ls . However this is not my computer, so the ls functionality has been revamped so that it gives the filesizes in front like this :
This is the output of ls command : I stored the output in a file filelist
1.1M... (5 Replies)
Discussion started by: ajayram
5 Replies
8. Shell Programming and Scripting
Hi experts,
I want to convert a txt file having rows and columns (CNAI_DUMP_raw.txt) by comparing it with another text file (paramaters.txt) and generate a output in CSV which contains only 3rd column from CNAI_DUMP_raw.txt, and the columns mentioned in parameters.txt.
FYI: There are two... (16 Replies)
Discussion started by: Gautam Banerjee
16 Replies
9. Shell Programming and Scripting
we are getting files on daily basis.we need to process these files.
i need a unix shell script where we can count
1-The no of files processed
2-No of data/record processed for each files.
The script should log these details into a database table. If there is any error while file... (3 Replies)
Discussion started by: Atul kumar
3 Replies
LEARN ABOUT LINUX
setegid
SETEUID(2) Linux Programmer's Manual SETEUID(2)
NAME
seteuid, setegid - set effective user or group ID
SYNOPSIS
#include <sys/types.h>
#include <unistd.h>
int seteuid(uid_t euid);
int setegid(gid_t egid);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
seteuid(), setegid():
_BSD_SOURCE || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600
DESCRIPTION
seteuid() sets the effective user ID of the calling process. Unprivileged user processes may only set the effective user ID to the real
user ID, the effective user ID or the saved set-user-ID.
Precisely the same holds for setegid() with "group" instead of "user".
RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set appropriately.
ERRORS
EPERM The calling process is not privileged (Linux: does not have the CAP_SETUID capability in the case of seteuid(), or the CAP_SETGID
capability in the case of setegid()) and euid (respectively, egid) is not the real user (group) ID, the effective user (group) ID,
or the saved set-user-ID (saved set-group-ID).
CONFORMING TO
4.3BSD, POSIX.1-2001.
NOTES
Setting the effective user (group) ID to the saved set-user-ID (saved set-group-ID) is possible since Linux 1.1.37 (1.1.38). On an arbi-
trary system one should check _POSIX_SAVED_IDS.
Under libc4, libc5 and glibc 2.0 seteuid(euid) is equivalent to setreuid(-1, euid) and hence may change the saved set-user-ID. Under glibc
2.1 and later it is equivalent to setresuid(-1, euid, -1) and hence does not change the saved set-user-ID. Similar remarks hold for sete-
gid().
According to POSIX.1, seteuid() (setegid()) need not permit euid (egid) to be the same value as the current effective user (group) ID, and
some implementations do not permit this.
SEE ALSO
geteuid(2), setresuid(2), setreuid(2), setuid(2), capabilities(7), credentials(7)
COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2009-10-17 SETEUID(2)