02-01-2013
Please give us a full and short example by providing :
The name of the 2 directories
The name and the content of 4 corresponding files (2 in each directories)
And show us the output you expect.
I think it will then be easier for us to understand your requirements and help you
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello everyone,
how can I send output to the screen from a running script or tcl, in such a way that if a loop is executing I will see the rolling counter on my screen as the records are processed in the loop. I do not want the screen to scroll, though. In other words can a var's value be painted... (2 Replies)
Discussion started by: lifespan
2 Replies
2. Shell Programming and Scripting
Say I have (in psuedocode)
For i=1 to 10
tar cvfb /... 5*i /junk(i)
end
What I mean is that I want each successive for loop to have the block size parameter be 5 times the current counter. This isn't my actual code, just a stupid example...So the question is how do I descrive that parameter... (2 Replies)
Discussion started by: jeriryan87
2 Replies
3. Shell Programming and Scripting
The scenario is like this :
I need to read records from a file one by one and increment counter1, if a certain field matches with a number say "40"..the script should increment the counter2 and also extract a corresponding field from the same line and adding them one by one and redirecting the the... (5 Replies)
Discussion started by: mady135
5 Replies
4. Shell Programming and Scripting
Hi,
hope I am posting in the right section.
My problem is that I have 2 or more arguments passed and I want to check if the arguments passed exists or not.
The first argument should not exist and the remaining others should exist.
example:
./shells.sh argument1 argument2 argument3
... (5 Replies)
Discussion started by: fight4love
5 Replies
5. Shell Programming and Scripting
Hello Everyone,
I'm in need of assistance on creating a script with a counter on a certain string.
Basically this script opens a log file and displays certain log data. There are two key words in the log. START and FINISH. In between the START and FINISH is a variable ACTNUMBER. It will... (1 Reply)
Discussion started by: rxc23816
1 Replies
6. Shell Programming and Scripting
hello,
File 1
main Group sub group
MIT VAR_1D_DATA_TYPE 23-03-2012
MIT VAR_1D_DATA_TYPE 22-03-2012
MIT VAR_10D_DATA_TYPE 23-03-2012
MIT VAR_10D_DATA_TYPE 22-03-2012
MIT ... (0 Replies)
Discussion started by: manas_ranjan
0 Replies
7. Shell Programming and Scripting
Hi,
I am working on a script where I need to add one functionality i.e. to could the number of tar files at particular location...but the script is working in below way.
1) create sandbox
2) Drop old member function
3) addmember function
4) Apply checkpoint lable
5) Resync operation(This... (1 Reply)
Discussion started by: anuragpgtgerman
1 Replies
8. Shell Programming and Scripting
Hello,
I have currently coded a bash script below in which it does the following:
# Archives compressed file from another location.
Basically it moves *.gz files to another location.
The script also sends an email whenever a new compressed file is placed. This is the issue that i... (5 Replies)
Discussion started by: Wizard_1979
5 Replies
9. Shell Programming and Scripting
Hi!
Can anyone explain this? The counter CDR_count should go on forever, but it suddenly resets at every step of the FOR loop (I know this because $_file has exactly 378 records). However, the counter reset is OUTSIDE the FOR loop. What's going on??
#!/bin/bash
if || ; then
echo
... (8 Replies)
Discussion started by: Flavius
8 Replies
10. Shell Programming and Scripting
#!/usr/bin/ksh
c=0
while ]; do
echo /tmp/unex NOT found, iter : $c;
((c = $c + 1));
sleep 2;
done
so, the above counter doesn't work, already tried both -lt & -gt, and changed || to &&
so what am I missing?
Thanks in advance (5 Replies)
Discussion started by: unexistance
5 Replies
SXID(1) General Commands Manual SXID(1)
NAME
sxid - check for changes in s[ug]id files and directories
SYNOPSIS
sxid [ --config <file> ] [ --nomail ] [ --spotcheck ] [ --listall ]
DESCRIPTION
Sxid checks for changes in suid and sgid files and directories based on its last check. Logs are stored by default in /var/log/sxid.log.
The changes are then emailed to the address specified in the configuration file. The default location for the config file is /etc/sxid.conf
but this can be overridden with the --config option and specifying an alternate location.
OUTPUT
The program outputs several different checks concerning the current status of the suid and sgid files and directories on the system on
which it was run. This is a basic overview of the format.
In the add remove section, new files are preceded by a '+', old ones are preceded by a '-' NOTE: that removed does not mean gone from the
filesystem, just that it is no longer sgid or suid.
Most of it is pretty easy to understand. On the sections that show changes in the file's info (uid, gid, modes...) the format is old->new.
So if the old owner was 'mail' and it is now 'root' then it shows it as mail->root.
The list of files in the checks is in the following format:
/full/path *user.group MODE
(MODE is the 4 digit mode, as in 4755)
In the changes section, if the line is preceded by an 'i' then that item has changed inodes since the last check (regardless of any s[ug]id
change), if there is an 'm' then the md5sum has changed.
If a user or group entry is preceded by a '*' then it's execution bit is set (ie. *root.wheel is suid, root.*wheel is sgid, *root.*wheel is
+s).
On the forbidden directories, if ENFORCE is enabled an 'r' will precede forbidden items that were succesfully -s'd, and an '!' will show
that it was unsuccesfully -s'd (for what ever reason).
OPTIONS
-c, --config <file>
specifies an alternate configuration file
-n, --nomail
sends output to stdout instead of emailing, useful for spot checks
-k, --spotcheck
Checks for changes by recursing the current working directory. Log files will not be rotated and no email sent. All output will go
to stdout.
-l, --listall
Useful when doing --spotcheck or --nomail to list all files that are logged, regardless of changes.
AUTHOR
Ben Collins <bcollins@debian.org>
REPORTING BUGS
Report bugs to current maintainer Timur Birsh <taem@linukz.org>.
SEE ALSO
sxid.conf(5)
sXid 4.0.5 January 2002 SXID(1)