General :: Executing Shell Script With 654 Permissions Inside Another One

Apr 22, 2010

I have this scenario, where in I'm calling a shell script inside another shell script. The only criteria here is that the embedded script will have 654 permissions and the master script should be able to execute this embedded script. The sample code is given below:

#!/usr/bin/ksh
maindir=/usr/home01/temp/dir
bindir=${maindir}/batch/bin
${bindir}/test.ksh -d ${dblogin} -i ${datadir} -r ${filedt} > ${tmp_log}

The test.ksh which has 654 permissions is called by the main.ksh script and when I try to run it using ./main.ksh, it fails with the error "Execute permissions denied."

View 2 Replies


ADVERTISEMENT

General :: Executing Shell Script - Setting Permissions And Providing Path

Jan 4, 2011

I've been looking around the net for executing a shell script. My basic understanding is that after setting executable permissions and providing a path (#!/bin/sh) in the first line of the script, I can type ./myscript to execute instead of sh myscript. This is not working for me. I can run "sh myscript" but not "./myscript" even though I know for sure I have across the board execute permission and my sh path is correct. I'm working on a redhat linux station.

View 6 Replies View Related

General :: Executing An Awk Command Inside Perl Script?

Jul 30, 2011

I want to execute a awk command, which reads from txt files and sums the numbers from the first column for those listed only inside a <init> block -- The awk command is like

Code:

awk '/</?init>/{x = !x}x{a++}x && a > 2{sum+=$1}END{printf"%E" "
", sum}

So, I want to execute it inside a perl script, and execute the awk command for the infile which is also defined outside awk loop, ie doing something like

Code:

foreach $infile (@ARGV) {
$gzin = gzopen($infile, "r") || die ("Couldn't open file $infile
");
# No. events and cross-section from current file

[code]....

View 1 Replies View Related

General :: Read And Execute Permissions For Executing The File

Mar 2, 2010

Binary files need only execute permission to execute. No read permission is required. But all executable files must be read by the kernel into main memory before executing. Also script files need both read and execute permissions for executing the file.

View 5 Replies View Related

General :: Executing A Shell Command In Emacs?

Dec 17, 2010

I tried to execute a shell command by M-! cmd RET but it did not work.M-! does not turn up in the microbuffer no matter how many times I press Alt+!.But if I go to Tools menu and select Shell Command... option then it writes M-! to the microbuffer and everything works fine.What is the problem here?

View 2 Replies View Related

General :: Shell Script Executing Automatically?

May 16, 2011

I want login.sh shell script executing automaticaly whenever i open the console..?and also logout.sh shell script executing automaticaly whenever close the console.

View 1 Replies View Related

General :: Executing .sql Files In Shell Script?

Nov 22, 2010

i have n files and each file has 5-6 .sql files.Now I need to wrie a shell script that executes all the n files in parellel and for each n file the .sql files sequentially.eg

CRM_File CM_file AP_file
crm_file_1425.sql
cm_file_5789.sql
ap_file_4124.sql

[code]....

run CRM_File CM_file AP_file in parellel and each file under CRM_File,CM_file,AP_file sequentially.

View 6 Replies View Related

General :: Using Bash Shell Script Inside Php?

Dec 30, 2010

how do i use bash shell scripts inside php.I am just trying to call a simple cp command using php. Its not doing anything.

View 2 Replies View Related

General :: Play Beep Sound Inside Shell Script?

Aug 4, 2011

I need to make beep sound inside my basic shell script. code...

View 5 Replies View Related

General :: Redirect Output Of A Command To Another File Inside Shell Script?

Aug 26, 2010

I am writing a script in which I am using AWK to append to a line in a file and save the file. The command I am using is:

Code:
awk '{s=$0; if ( NR==4 ){s=s ":/usr/java/jdk1.6.0_19/bin" } print s;}' $appName > $appName.new

[code]...

View 4 Replies View Related

Ubuntu Servers :: Script Not Executing On Reboot (with 755 Permissions)

Feb 18, 2010

I am trying to get a start up script to work, I have a file /etc/init.d/blah (with 755 permissions) with the contents [URL]. I have run "update-rc.d -f blah defaults". But when I reboot the script is not executing.

View 1 Replies View Related

Programming :: Executing Shell Command In JSP

Aug 24, 2010

what we are trying to do is, to let the customer click a button in the web browser, and then the web server to call a shell script to do the work. The output from the stdout && stderr of the script should be displayed in the web browser once finished or timeout, along with the exit code of the script.

The shell script is however not on the web server, but on another app server. So to call this script from the web server as the identity 'tomcat':

Code:
$ sh appuser@app-server:$appbin/app-script

The .ssh/id_rsa.pub thing is done, and we have no problem doing this in the command line so far.

Our loaded ex-colleage has left us the webpages (jsp) with code like these:

Code:
<%@ include file="jsp_functions.jsp" %>
<%
String cmd = "sh $appbin/app-script";
ExecResult r = new ExecResult();

[Code].....

View 6 Replies View Related

General :: Runs Multiple Shell Script Inside A Main Script Using Crontab?

Oct 22, 2009

I wrote a simple shell script called main.sh and inside it calling another shell script called rename.sh.Both are placed in a same directory.[/home/srimal/test]

$cat main.sh
Code:
#!/bin/sh

[code]...

View 4 Replies View Related

General :: Recreate A User With/without Impacting Existing Filesystem/permissions/shell?

Jun 1, 2010

I am trying to run a cron job as an oracle user. I put the user in the cron.allow file but it still won't run. Other users are able to run a cron job though. I think it's the way the oracle user was created and I wanted to recreate it. However it owns a lot of other file systems as well as the database. Is there a way to recreate or reset the oracle account without impacting what is currently in place?

View 1 Replies View Related

Programming :: How To Use A Function Inside A Shell

Apr 28, 2011

I am very new to shell script, and my requirement is --

1. open the apache access log, use "cut" and "grep" to find the numbers.
2.put the result in a file
3.then compare the same result with day before result
4. send the result via e-mail.

so how can i do that , using some functions..

View 1 Replies View Related

Ubuntu Servers :: Apache - Change The Permissions For A Directory And All Files Inside

Dec 12, 2010

I would like to change the permissions for a directory and all files inside the directory how do I do this? The website is located only on my local network so I am not worried about security. Also what would be the optimal permissions for running wordpress.

View 1 Replies View Related

General :: Errors Executing Shell Script: "command Not Found" And "no Such File Or Directory"

Jan 14, 2011

A colleague gave me a shell script ("dti_motion") which needs to be run from the directory containing all the files it works on. I want to run the same script for several different directories. But I don't want to have to cd into each directory, run the script, wait for it to finish, and then cd to the next directory (there are 52 to do altogether).

So I wanted to write a very simple script that will cd to each directory and perform the script there, before going on to the next one. My colleague's script ("dti_motion") is stored in my home/bin/ and is executable. My home/bin/ is in my path, as verified by echo $path. When run from a directory containing the necessary information, the dti_motion script works perfectly well. I wrote an extremely inelegant script called "dti_motion_do_all" which is also stored in my home/bin/ and executable:

#!/bin/sh
#Get motion information for each subject, using Mark's script, called dti_motion
cd /imaging/cr01/PD_DTI/C_10/12x5

[code]....

I know there will be more elegant ways to write this script with loops, rather than simply using cd, but for the moment, I just want this to run, until I have learnt to use loops properly. how to correct either of those "command not found" or "no such file or directory" errors, given that both the original dti_motion and my dti_motion_do_all script are in my /home/bin/ (which is on my path) and both scripts are executable?

View 1 Replies View Related

Ubuntu Installation :: Gnome-shell On 10.04 Beta Inside Virtualbox

Apr 12, 2010

I have installed VirtualBox because I want to test out things like 10.04 and gnome-shell. So, I have downloaded an Ubuntu 10.04 32-bit .vdi from mininova (and so far I'm assuming that the downloaded file is good), and I've been tooling around with it a bit. It was a bit choppy at times, but that was probably because I was running several other things at the same time. My comp's stats are in my sig (only addressing 2.9 gigs of ram due to the 32-bit kernel), and I think that any choppiness was due to overloading the computer with other things. The proc temp also went to record highs, ~75 Celsius, iirc. The vm has been alloted 1 proc (out of 2) 512 ram. The problem I am having is that I wanted to install gnome-shell to try it out, but I get an error,

[Code]...

View 6 Replies View Related

Ubuntu Installation :: Getting Gnome-shell On 10.04 Beta Inside Virtualbox?

Apr 25, 2010

I have installed VirtualBox because I want to test out things like 10.04 and gnome-shell. I have downloaded an Ubuntu 10.04 32-bit .vdi from mininova (and so far I'm assuming that the downloaded file is good), and I've been tooling around with it a bit. It was a bit choppy at times, but that was probably because I was running several other things at the same time. My comp's stats are in my sig (only addressing 2.9 gigs of ram due to the 32-bit kernel), and I think that any choppiness was due to overloading the computer with other things. The proc temp also went to record highs, ~75 Celsius, iirc. The vm has been alloted 1 proc (out of 2) 512 ram.The problem I am having is that I wanted to install gnome-shell to try it out, but I get an error,

Code:

adminuser@adminuser-desktop:~$ sudo apt-get install gnome-shell
[sudo] password for adminuser:
Reading package lists... Done
Building dependency tree

[code]...

So, I have xulrunner-1.9.2 already, so I tried to install 1.9.1 anyway, and it appeared to install, and I now have 1.9.1.9 and 1.9.2.3 installed, but trying to install libgsj0 results in the same error as above.

View 9 Replies View Related

Ubuntu :: 'set' Command In Terminal Has Shell Scripts Embedded Inside?

May 3, 2010

I just installed Ubuntu 10.04 for some development. I was trying to set some environment variables are noticed that when I hit 'set' inside a terminal (to dump environment vars) I get the usual first few variables but then I see a whole lot of script code ....

Code:

WINDOWID=23068675
XAUTHORITY=/var/run/gdm/auth-for-sid-5IDovs/database
XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg
XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/

[code]....

I've installed a lot of tools (NetBeans, Ruby, Java, build-essentials etc) but essentially I installed Ubuntu today - so it shouldn't have rotted out this quickly. is this hijacking of environment vars to embed script code intentional with Ubuntu 10.04?

View 1 Replies View Related

Ubuntu :: Press Properties Thego To Permissions And Check "allow Executing As Program" Is Missing?

Jun 16, 2010

I have the file for Conky Wizard ver.1 but in order to run it to make it executable. From what I know, I'm supposed to right click the file and press properties thego to permissions and check "allow executing as program" However, this option is missing. Here is the link to the ConkyWizard Ver1 Beta 1 file.

View 9 Replies View Related

Ubuntu :: No Permissions/sudo In Shell?

May 22, 2010

Just added a new 250g internal-drive in my karmic box, all seems OK and I formatted the partition with Gparted as ext4 but now can't create folders. Unfortunately I don't seem to be able to use a bash shell either, if I type anything in I get no problems until I attempt sudo and then I'm unable to type in a password!

View 2 Replies View Related

Ubuntu :: All .rtf Files Have "Allow Executing File As Program" Box Checked Under Their File Permissions

May 17, 2010

A bunch of my .rtf files suddenly (within the last few days, not sure when) have the "Allow Executing File as Program" box checked under their file Permissions. So whenever I try to open an rtf document, it asks if I want to run it. What's up with that?

View 3 Replies View Related

General :: RW Permissions On External HDD - Chmod: Changing Permissions Of `whatever': Read-only Filesystem

Mar 15, 2010

I have a problem with my external hdd, I mounted it manually and in the mount table it says ive got rw permissions. But when i try to change permissions it says:

chmod: changing permissions of `whatever': read-only filesystem.

This is my mount table:

[root@localhost ExtHDD]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)

[code]....

View 6 Replies View Related

General :: $HOME/.bashrc Disabled When User Shell Is 'rbash' (restricted Shell)?

Jun 15, 2011

MACHINE: HP Proliant DL260G5OS: SLES 11 SP1kernel: Linux xserver 2.6.32.12-0.7-default #1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/LinuxIt is used as remote xserver in a LAN.I have configured /usr/lib/restricted/bin/.rbashrc with some environment variables but when the users logon in the system finally is executed $HOME/.bashrc and some environment vars are overwritten.

View 2 Replies View Related

General :: Executing File Of Some Other Directory From PWD

Jan 14, 2010

My present working is
Code:
linux:/home/anisha/downloads/mapnik-0.6.1/demo/c++ #
Now I want to run "python scons/scons.py" located in
Code:
linux:/home/anisha/downloads/mapnik-0.6.1/ #

I tried
Code:
../../python scons/scons.py
From the above stated PWD but it resulted in the following:
Code:
bash: ../../python: No such file or directory
What is the way to execute a file of some other directory from the PWD!

View 14 Replies View Related

General :: Error Executing The Script?

Jun 16, 2011

Running following script for checking root ssh login status.

Code:
Flag=`cat /etc/ssh/sshd_config | grep "^PermitRootLogin"`
if [ -z "$Flag" ]
then

[Code].....

View 1 Replies View Related

General :: Executing AT Commands On USB Modem?

Aug 13, 2010

I have a USB modem on a Debian install that I want to be able to use AT commands to diagnose, specifically for obtaining signal strength (RSSI). I know the command for this is AT+CSQ but I cannot seem to get the interface for issuing AT commands to work.

The modem is using /dev/ttyACM0 and when I try to use minicom, I type in AT commands and nothing is echoed to the screen (Yes, echo is turned on). Maybe I just don't know how to use minicom correctly.

View 9 Replies View Related

General :: Executing Awk Script Without File Name?

Jul 15, 2010

Code:

#!/usr/bin/awk -f
BEGIN{ FS=":"}
{
"groups "$1 | getline grps

[code]....

View 5 Replies View Related

General :: Executing Command Over A Network?

Aug 6, 2010

I have a some c source code files that i have to copy to linux machine from a windows machine over a network. This source code folder has to be copied into a particular directory structure in the linux system at the other end. After copying the file into the appropriate folder in the linux server i have to instruct the linux machine to make(using the make file that is there with the c files) this source code from the windows machine. Does anyone have any idea in regard to how this can be implemented?? i am trying to have a gui client that has the above mentioned options(copying and inserting the c files into the appropriate directory and then for making the files and getting the executable.)

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved