Hi,
First off I usually script in the bash shell.
Ok, in my script I am checking to see if the filename has a .txt extension.
So I was trying:
and
But no go the first example sort of works but it always echo out the statement.
Correct me if i'm wrong, but by adding "#!/bin/ksh" at the start of a script will force it to run in the korn shell no matter which shell you are currently using?? (2 Replies)
I'm using solaris and i have an old script that an ex employee wrote but i can't seem to get it working. well is just one part of the script
if ($?MC_PROD_DIR == 0) setenv MC_PROD_DIR $HOME/PRODUCTION
source $MC_PROD_DIR/scripts/localenv
** i understand what this part of the script is... (1 Reply)
Can anyone help with these scripts? Im new to this and struggling. Thank you for your help.
Pre-requisites
Create a file with x amount of lines in it, the content of your choice. (Have already done this)
Script 1
Write a script that takes two arguments. The first being a line of text,... (3 Replies)
Anyone know why this won't work?
#!/usr/bin/ksh
for db in `cat /etc/oratab|egrep ':N|:Y' | grep -v \* | cut -f1 -d":"`
do
echo "************************"
echo "database is $db"
echo "************************"
done
I am getting an error on the line... (7 Replies)
Here is my problem.
I have a txt file with a list of user names in both upper case and lower case. I need to remove the names from the passwd file. I want to be able to run a script that looks at my txt list and then removes those names from the passwd file. It would be nice if it backed up the... (3 Replies)
I am trying to write a script to check the STIG our unix boxes. I want to put in checks to determine if certain files or directories are there. For example:
If /opt/SUNWexplo exists
echo "Sun Explorer exists"
else
echo "Sun Explorer is not installed"
I am sure I could write... (2 Replies)
I have a script that will calculate some information about the current directory that I run the script in. How can I have it where it gets an argument from the user(such as a directory) and the script calculate the information for the given directory? Any help is greatly appreciated. (8 Replies)
How can I include a counter in this if statement so only sends out 5 notifications.
# the if statement will check for the lines status, if status is down sends email
if
then
LIST="user@email.com"
mail -s "rje_lines_down" $LIST < ${tmpfile} #sends an email to list
fi
thanks... (2 Replies)
Gents for 2013 I have embarked on learning C and just wrote my first script and need some help. In the learning process, I am trying to understand where I went wrong with my script. The flow of the script is as such:
Enter a number --> check if it is a number --> if it is not a number,print what... (4 Replies)
Discussion started by: metallica1973
4 Replies
LEARN ABOUT DEBIAN
xsil2graphics
XSIL2GRAPHICS(1) User Contributed Perl Documentation XSIL2GRAPHICS(1)NAME
xsil2graphics - generate scripts to load xsil output data files
SYNOPSIS
xsil2graphics [options] <xsil_file>
DESCRIPTION
Utility program bundled with xmds, used to generate scripts that load simulation output data into either matlab (http://www.mathworks.com)
or scilab (http://www.scilab.org), which are then used to manipulate the results further if necessary and then to present the results
graphically.
Matlab
To generate a matlab m-file, from the xsil file data_file.xsil use the command:
bash$ xsil2graphics data_file.xsil
or
bash$ xsil2graphics --matlab data_file.xsil
Then at the matlab command prompt:
>> data_file
Scilab
To generate a scilab script file, from the xsil file data_file.xsil use the command:
bash$ xsil2graphics --scilab data_file.xsil
Then at the scilab command prompt:
--> exec('data_file.sci')
OPTIONS -m, --matlab generate matlab m-file script to load data from the xsil data file (the default option)
-s, -scilab generate scilab script file to load data from the xsil data file
-o, --outfile <out_file> specify an alternative output script filename to the default which is the input xsil filename with the .xsil
extension changed to either .m for the matlab m-file or .sci for the scilab script file
EXAMPLES
bash$ xsil2graphics nlse.xsil
Generates the output nlse.m to load the data into matlab
bash$ xsil2graphics -m nlse.xsil
Also generates the output nlse.m but explicitly sets matlab to be the output format
bash$ xsil2graphics --scilab nlse.xsil
Generates the output nlse.sci to load the data into scilab
bash$ xsil2graphics --outfile nlse_new.m nlse.xsil
Generates the output nlse_new.m to load the data into matlab
AUTHORS
Originally written by Greg Collecutt
Maintained by Paul Cochrane with code contributed by Joe Hope
BUGS
No known bugs.
SEE ALSO xmds(1), loadxsil(1)
http://www.xmds.org
COPYRIGHT
Copyright (C) 2000-2004
Code contributed by Greg Collecutt, Joseph Hope and Paul Cochrane
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER-
CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
perl v5.8.2 2004-06-21 XSIL2GRAPHICS(1)