09-28-2010
Can you post the entire script in one block instead of clips of it?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How can I pass in an argument such as "*.k" to a bash script
without having to double-quote *.k and not having *.k
`glob` to match all files in the pattern?
I tried using noglob in my script but this didn't work the way I thought
it would.. expansion is still occuring, $# is higher than I... (3 Replies)
Discussion started by: zoo591
3 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I am writing a BASH script. In a directory I have a bunch of files of various filename structures. How do I list all the filenames that begin with either a capital or lowercase A or T. Is there one command that could replace the following 4:
ls A*
ls a*
ls T*
ls t*
Thanks.
Mike (3 Replies)
Discussion started by: msb65
3 Replies
3. Shell Programming and Scripting
Hi all
I need to copy the entire contents of one file into an existing file at a specific location. I know the exact line number where I need to put it. It appears I would use either sed or awk to do this, but I have been unsuccessful so far:
File A
line 1
line 2
line 3
line 4
... (6 Replies)
Discussion started by: gshepherd7
6 Replies
4. Shell Programming and Scripting
how to concatenate particular string in each line of a file..
root$cat conf
check_11043
heartbeat_4345
----------
if i want to add the string "done" output of the file should be
check_11043 done
heartbeat_4345 done (1 Reply)
Discussion started by: mail2sant
1 Replies
5. Shell Programming and Scripting
Create a script that copies files from one specified directory to another specified directory, in the order they were created in the original directory between specified times. Copy the files at a specified interval. (2 Replies)
Discussion started by: allways4u21
2 Replies
6. Shell Programming and Scripting
I tried to use the wildcard '*' in my bash script, but I can not get it work. Here is a simple example (list file names in current directory):
ls ./*
does not work in my bash script. But it works if I use
ls ./
So is there any special syntax to use '*' wildcard in bash script (I tested the... (11 Replies)
Discussion started by: aerosols
11 Replies
7. Shell Programming and Scripting
I'm writing a bash script that reads a file location from a user, and I'm wondering how to get the script to accept tab to auto complete the directories that are input. (8 Replies)
Discussion started by: Prodiga1
8 Replies
8. Shell Programming and Scripting
I don't know if this is a big issue or not, but I'm having difficulties. I apoligize for the upcoming essay :o.
I'm writing a script, similar to a paint program that edits images, but in the form of ANSI block characters. The program so far is working. I managed to save the image into a file,... (14 Replies)
Discussion started by: tinman47
14 Replies
9. Shell Programming and Scripting
Hi
This is my third past and very impressed with previous post replies
Hoping the same for below query
How to find a existing file location and directory location in solaris box (1 Reply)
Discussion started by: buzzme
1 Replies
10. Shell Programming and Scripting
Hi there,
I am pretty new to linux scripting so ..
I am writing a script to loop through all my directories of sequence files in order to do stuff with them (trimming, normalizing, stuff that one would do with sequence files).
Here I need to pick out files that match each other. The files... (10 Replies)
Discussion started by: jahndavik
10 Replies
LEARN ABOUT DEBIAN
syslogout
SYSLOGOUT(8) System Manager's Manual SYSLOGOUT(8)
NAME
syslogout - modular centralized shell logout mechanism
DESCRIPTION
syslogout is a generic approach to enable centralized shell logout actions for all users of a given system in a modular and centralized way
mostly aimed at avoiding work for lazy sysadmins. It has only been tested to work with the bash shell.
It basically consists of the small /etc/syslogout shell script which invokes other small shell scripts having a .bash suffix which are con-
tained in the /etc/syslogout.d/ directory. The system administrator can drop in any script he wants without any naming convention other
than that the scripts need to have a .bash suffix to enable automagic sourcing by the /etc/syslogout script.
For shell sessions, the contents of /etc/syslogout.d/" will be sourced by every user at logout if the following lines are present in his
$HOME/.bash_logout:
if [ -f /etc/syslogout ]; then
. /etc/syslogout
fi
If used for X sessions it is advisable to include the former statement into the Xreset script of the X display manager instead to prevent
that closing of an terminal emulator window yields unexpected results in your running X session if your X11 terminal emulator is using a
login shell. Be sure then to run it under the user-id of the X session's user. See the example files in /usr/share/doc/syslogout/ for
illustration.
Users not wanting /etc/syslogout to be sourced for their environment can easily disable it's automatic mechanism. It can be disabled by
simply creating an empty file called $HOME/.nosyslogout in the user's home directory using e.g. the touch(1) command.
Any single configuration file in /etc/syslogout.d/ can simply be overridden by any user by creating a private $HOME/.syslogout.d/ directory
which may contain a user's own version of any configuration file to be sourced instead of the system default. It's names have just to
match exactly the system's default /etc/syslogout.d/ configuration files. Empty versions of these files contained in the $HOME/.syslo-
gout.d/ directory automatically disable sourcing of the system wide version.
Naturally, users can add and include their own private scripts to be automagically executed by /etc/syslogout at logout time.
OPTIONS
There are no options other than those dictated by shell conventions. Anything is defined within the configuration scripts themselves.
SEE ALSO
The README files and configuration examples contained in /usr/share/doc/syslogout/ and the manual page for bash(1), xdm(1x),
xdm.options(5), and wdm(1x). Recommended further reading is everything related with shell programming.
If you need a similar mechanism for executing code at login time check out the related package sysprofile(8) which is a very close compan-
ion to syslogout.
BUGS
syslogout in its current form is mainly restricted to bash(1) syntax. In fact it is actually a rather embarrassing quick and dirty hack
than anything else - but it works. It serves the practical need to enable a centralized bash configuration until something better
becomes available. Your constructive criticism in making this into something better" is very welcome. Before i forget to mention it: we
take patches... ;-)
AUTHOR
syslogout was developed by Paul Seelig <pseelig@debian.org> specifically for the Debian GNU/Linux system. Feel free to port it to and use
it anywhere else under the conditions of either the GNU public license or the BSD license or both. Better yet, please help to make it into
something more worthwhile than it currently is.
SYSLOGOUT(8)