11-08-2018
Welcome to the forums
I must be a party breaker here, without dwelling into code..
Why do you think for security and efficiency reasons would one exchange a shell script with a c program to start a java program ?
Seems like an insane overhead to me, even for someone who will write a good c program to do that action.
Would it help to rewrite shell code perhaps ?
Some features or something you would like to improve ?
Regards
Peasant.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
So I need a script that does the following:
If a certain user is logged in
Run `command`
Else
Echo “incorrect user”
This is my first stab...which doesn't work:
#!/bin/bash
X="user=`ls -l /dev/console | cut -d " " -f 4`"
Y="foobar"
echo $X
echo $Y (4 Replies)
Discussion started by: doubleminus
4 Replies
2. Shell Programming and Scripting
I'm trying to write a script that moves data that's older than 2 weeks to a different place.
It works well, EXCEPT, that when the script hits a file within a directory inside the working directory, it will move it to the root of the destination directory instead of putting it in the correct... (1 Reply)
Discussion started by: ugolee
1 Replies
3. Shell Programming and Scripting
Hello everyone,
sorry for the title, most of you must getting sick of reading something like
this, but I haven't found a solution, although I found many threads according
to it.
I'm working on a bash script that connects to a network printer with ftp
where I want to upload a pdf created... (3 Replies)
Discussion started by: le_mae
3 Replies
4. Shell Programming and Scripting
So i'm currently working on a project where I'm attempting to display information of users from the /etc/passwd file and also another information file holding addition information about users.
Problem is I've been trying to join the two files together and have all of the information about each... (2 Replies)
Discussion started by: Nostyx
2 Replies
5. Shell Programming and Scripting
:wall::wall::wall:
Hi I have horrible script below, need help in renaming ls -l output into new filename format:
Desired output:
cp -pv original_path/.* newDirectory/owner_of_file.%dd%mm%y.file_extension.first_8_characters_of_original_filename
localuser@localuser:~ vi... (3 Replies)
Discussion started by: wolf@=NK
3 Replies
6. Shell Programming and Scripting
Hi friends,
I have two files - input and commands
I want to read the input and replace a value in it with the contents in commands.
My script is like this.
Instead of printing the value in the commands file, it is simply printing $cmd in the output file.
Any pointers are highly... (1 Reply)
Discussion started by: jacobs.smith
1 Replies
7. Shell Programming and Scripting
I am trying to execute expect command inside by small bash script to login into servers using key authentication method. My script is as follows:
#!/bin/bash
HOST=$1
/usr/bin/expect -c "
spawn ssh -i /root/.ssh/id_rsa root@$HOST
expect -exact "Enter... (3 Replies)
Discussion started by: John Wilson
3 Replies
8. Shell Programming and Scripting
Hi All,
I have to pick particular segments from a file and I have prepared below shell script.But its not working and I am not able to find out whats the issue.could you guys pls help?
Sample file:
TS3*1451575*12*20151231*4*482.44
NM1*QC*1*CUTLER*BETTY
DTM*472*20150808... (4 Replies)
Discussion started by: Venkata Prasad
4 Replies
9. Shell Programming and Scripting
Hi,
maybe I'm asking a VERY dumb question, but would anybody out there tell me, why this f****** script won't work if executed as a cronjob, but works fine if executed from a shell prompt?
#! /bin/bash
set PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
date >>... (3 Replies)
Discussion started by: beislhur
3 Replies
10. Shell Programming and Scripting
i have defined a function ln_s() for customizing the ln command in script1.sh.
more script1.sh
echo "Starting Execution"
./script2.sh
echo "End of Execution"
ln_s(){
] && return
ln -s "$1" "$2"
}
My script1.sh executes another script2.sh which has the following entry
more script2.sh... (12 Replies)
Discussion started by: mohtashims
12 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)