03-31-2009
$Filename isn't known within awk. You could do this:
awk 'NR == 1 || substr($0,63,5) ~ /H... / && \
_++ == 1 { fn && close(fn); fn = Z "_" ++c; _ = 1 }
{ print > fn }' Z=$Filename $Filename
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Please Help! :o
I have a main script (ksh) where another script is called (convert_picture). Normally this works ok, but since some changes has been made on the unix-server (I dont know what :( ) suddenly it doesnt work anymore: i get an error message: ksh: convert_picture not found. I am... (3 Replies)
Discussion started by: Rakker
3 Replies
2. Shell Programming and Scripting
hey guys. i have a bunch of programs in a script that needs to run as root and the rest as another user, we'll call him gabriel.
now, in this script, i want to run the first few lines as root. now, how do i, after running as root, tell the script to run the remaining lines as the user gabriel?... (3 Replies)
Discussion started by: Terrible
3 Replies
3. Shell Programming and Scripting
Hi
Please help me with the following problem with my script.
The following block of code is not repeating in the while loop and exiting after searching for first message.
input_file
==========
host001-01
host001-02
2008-07-23 13:02:04,651 ConnectionFactory - Setting session state... (2 Replies)
Discussion started by: pcjandyala
2 Replies
4. Shell Programming and Scripting
hi,,
i have perl scipt with line :
system('./try.sh $t $d $m');
in shell scipt try.sh i have the line:
echo $1
its not printing value of $t that i hav passed..y is it so..i am running it from apache web server (2 Replies)
Discussion started by: raksha.s
2 Replies
5. UNIX for Dummies Questions & Answers
Hello All. I have a script that is suppossed to start up a daemon but when executed, simply hangs. Could you please take a look and let me know where the problem might be? TIA
###################################################################
#
# SCRIPT: dstart3000.sh
# Bring up the Domain... (6 Replies)
Discussion started by: grin1dan
6 Replies
6. Shell Programming and Scripting
Hi everyone,
I got a problem with a script. What it's supposed to do is:
to take as arguments a directory name <dir> and a dimension (in byte) <dim>;
if <dir> exists, to write name and dimension of every regular file within it that sizes lesser than <dim> in regFileList.
Nothing happens... (10 Replies)
Discussion started by: Luke Bonham
10 Replies
7. Shell Programming and Scripting
Hi all,
I have a script that calls another program/script, xxx, to run in the background. Supposedly this program at most should finish within five (5) minutes so after five (5) minutes, I run some other steps to run the script into completion.
My problem is sometimes the program takes... (5 Replies)
Discussion started by: newbie_01
5 Replies
8. Shell Programming and Scripting
Hi ,
I have moduled my scripts in three scripts .
From First script i am calling second and from second i am calling third for some check .
Problem is with the third script call.
---In second script
EXP ='test.\abc.\Server.*abc.xml.*'
pid=$($HOME/bin/checkpid $EXP)
--Third... (2 Replies)
Discussion started by: amrishn
2 Replies
9. Shell Programming and Scripting
Hello,
Ubuntu server 11.10
can anybody help what is problem with my shell script?
#!/bin/bash
#script to find out currently logged on user is root or not.
if ]
then
echo "You are super"
else
echo "You are awesome!"
fi
When I run script, I get following output
./uid: line 3:
I... (4 Replies)
Discussion started by: kaustubh
4 Replies
10. Shell Programming and Scripting
Hi team,
I have a script in different folder. Now i want to call that script and execute that script from that path alone.
My code is
#!/bin/bash
wname=yahoo
PATH='/opt/IBM'
wac=`/usr/bin/ls $PATH | /usr/bin/grep "$wname"`
STOP=`/usr/bin/find $PATH/$wac -type f -name "stop.sh"`... (8 Replies)
Discussion started by: natraj005
8 Replies
LEARN ABOUT DEBIAN
fookb-plainx
fookb(1) FOOcrosoft fookb(1)
NAME
fookb-plainx - Xkb state indicator without Window Maker support
SYNOPSIS
fookb-plainx [options]
DESCRIPTION
fookb is a Xkb state indicator. It displays the icon corresponding to the number of Xkb locked group. You may use mouse-clicks to change
Xkb locked group with mouse. Additionally, fookb can be configured to execute a program on changing group.
fookb man page is based on WMMail.app man page. Program was written from scratch.
To use fookb with the Window Maker Dock, simply drag the fookb icon to the Window Maker Dock (if fookb was compiled with Window Maker sup-
port).
OPTIONS
NB! Command line parameters take precedence over config file or X resources!
-icon1
-icon2
-icon3
-icon4
-iconboom
-display
CONFIGURATION FILE (for libWUtil-enabled version)
The configuration file consist of a single PropList dictionary, which in turn is composed of several PropList key-value pairs. The recog-
nized keys is:
Icon1 Filename (mandatory)
XPM file contains an icon (48x48) for 1st XKB group.
Icon2 Filename (mandatory)
XPM file contains an icon (48x48) for 2nd XKB group.
Icon3 Filename (mandatory)
XPM file contains an icon (48x48) for 3rd XKB group.
Icon4 Filename (mandatory)
XPM file contains an icon (48x48) for 4th XKB group.
IconBoom Filename (mandatory)
XPM file contains an icon (48x48) for "broken Xkb". Please look in BUGS section.
Sound (Yes|No)
fookb will run command from "Command" value (see below), if this parameter is set to "Yes". You'll receive (non-fatal) error message
if this parameter is not defined. In any other case command will not be run.
Command command_to_run
This command will be run if XKB locked group is changed and "Sound" is set to "Yes".
X resources
NB! Parameters in PropList config file take precedence over X resources!
fookb.icon1 Filename
fookb.icon2 Filename
fookb.icon3 Filename
fookb.icon4 Filename
fookb.iconBoom Filename
fookb.sound Yes/No
fookb.command Command
EXAMPLES
Here is an example of configuration file.
{
Icon1 = "/usr/local/share/fookb/icon1.xpm";
Icon2 = "/usr/local/share/fookb/icon2.xpm";
Icon3 = "/usr/local/share/fookb/icon3.xpm";
Icon4 = "/usr/local/share/fookb/icon4.xpm";
IconBoom = "/usr/local/share/fookb/crash.xpm";
Sound = "Yes";
Command = "/usr/bin/play /usr/local/share/fookb/click.au";
}
Here is an example of app-defaults file.
fookb.icon1: /usr/local/share/fookb/icon1.xpm
fookb.icon2: /usr/local/share/fookb/icon2.xpm
fookb.icon3: /usr/local/share/fookb/icon3.xpm
fookb.icon4: /usr/local/share/fookb/icon4.xpm
fookb.iconBoom: /usr/local/share/fookb/crash.xpm
fookb.sound: Yes
fookb.command: /home/bgates/bin/playmssound
FILES
~/GNUstep/Defaults/FOOkb
fookb defaults (for Window Maker enabled version).
~/.fookb
fookb defaults (for Window Maker disabled version).
BUGS
Sometimes fookb receives message about changing XKB group, but message.state.group does not point to any existing XKB group. In this case
fookb will show IconBoom (from config file) picture.
As far as I know the only way to look at this bug is to run vmware.
VERSION
This man page is [hopefully] up-to-date for version 3.0 of fookb.
AUTHORS
fookb is (c) 1998-2002 Alexey Vyskubov <alexey@mawhrin.net>.
This manpage was written by Alexey Vyskubov <alexey@mawhrin.net>.
fookb 10 Jan 2002 fookb(1)