Sponsored Content
Full Discussion: How to use SU inside script?
Top Forums Shell Programming and Scripting How to use SU inside script? Post 302780809 by rafae11 on Friday 15th of March 2013 06:26:11 AM
Old 03-15-2013
the pipe helped.

i had permission issues on my first create file.
my code works now.

Thanks
This User Gave Thanks to rafae11 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to find Script file location inside script

I have to find out the file system location of the script file inside script. for example a script "abc.sh" placed anywhere in the file system when executed shold tell by itself the location of it. example #pwd / #./abc this is / #cd /root #./abc this is /root #cd / #/root/abc this... (10 Replies)
Discussion started by: asami
10 Replies

2. Shell Programming and Scripting

Call a perl script inside a shell script

Hi all, I have the following snippet of code.. #!/bin/sh echo "run perl script............" #Run the verification script perl bill_ver echo " perl script completed....." echo "rename files......" #Remove from all file in the directories test, test1, test2, test3 for f in... (3 Replies)
Discussion started by: chriss_58
3 Replies

3. UNIX for Dummies Questions & Answers

Exit out of the Script Command inside a Script

I'm new to Linux. I have a bash script that invokes an executable. I'd like use the SCRIPT command inside the script and exit out of the script command after it writes to the file. Does this make sense? Below is an example of the contents of my script. #BEGIN SCRIPT script typescript... (6 Replies)
Discussion started by: jmungai
6 Replies

4. Shell Programming and Scripting

how to run shell script inside expect script?

I have the code like this : shell script continues ... .... expect -c" spawn telnet $ip expect "login:" send \"$usrname\r\" expect "Password:" send \"$passwd\r\" expect "*\>" send \"$cmdstr\r\" ... (1 Reply)
Discussion started by: robbiezr
1 Replies

5. Shell Programming and Scripting

Running a unix script(which is calling another script inside that) in background

Hi all, I am having a script ScriptA which is calling a script ScriptB in the same server and copying files to second server and have to execute one script ScriptC in the second server. THis First script ScriptA is the main script and i have to execute this process continously. for Keeping... (2 Replies)
Discussion started by: rohithji
2 Replies

6. Shell Programming and Scripting

Running a script from if block inside another script

how do i run a script from if block inside another script? this is what i tried but it doesnt seem to work: if test $a -eq $w then sh /home/scripts/script1.bash fi (3 Replies)
Discussion started by: shishirkotkar
3 Replies

7. Shell Programming and Scripting

Problem in calling a script inside a script

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

8. Shell Programming and Scripting

expect script inside shell script not working.

Shell Scipt: temp.sh su - <$username> expect pass.exp Expect script: pass.exp #!/usr/bin/expect -f # Login ####################### expect "Password: " send "<$password>\r" it comes up with Password: but doesnt take password passed throguh file. (2 Replies)
Discussion started by: bhavesh.sapra
2 Replies

9. Shell Programming and Scripting

How to merge Expect script inside shell script?

Hi I have two scripts one is Expect and other is shell. I want to merge Expect code in to Shell script so that i can run it using only one script. Can somebody help me out ? Order to execute: Run Expect_install.sh first and then when installation completes run runTests.sh shell script. ... (1 Reply)
Discussion started by: ashish_neekhra
1 Replies

10. Shell Programming and Scripting

Capture run time of python script executed inside shell script

I have bash shell script which is internally calling python script.I would like to know how long python is taking to execute.I am not allowed to do changes in python script.Please note i need to know execution time of python script which is getting executed inside shell .I need to store execution... (2 Replies)
Discussion started by: Adfire
2 Replies
POE::Pipe::TwoWay(3pm)					User Contributed Perl Documentation				    POE::Pipe::TwoWay(3pm)

NAME
POE::Pipe::TwoWay - a portable API for two-way pipes SYNOPSIS
my ($a_read, $a_write, $b_read, $b_write) = POE::Pipe::TwoWay->new(); die "couldn't create a pipe: $!" unless defined $a_read; DESCRIPTION
Pipes are troublesome beasts because there are a few different, incompatible ways to create them, and many operating systems implement some subset of them. Therefore it's impossible to rely on a particular method for their creation. POE::Pipe::TwoWay will attempt to create a bidirectional pipe using an appropriate method. If that fails, it will fall back to some other means until success or all methods have been exhausted. Some operating systems require certain exceptions, which are hardcoded into the library. The upshot of all this is that an application can use POE::Pipe::TwoWay to create a bidirectional pipe without worrying about the mechanism that works in the current run-time environment. By the way, POE::Pipe::TwoWay doesn't use POE internally, so it may be used in stand-alone applications without POE. PUBLIC METHODS
new [TYPE] Create a new two-way pipe, optionally constraining it to a particular TYPE of pipe. Two-way pipes have two ends, both of which can be read from and written to. Therefore, a successful new() call will return four handles: read and write for one end, and read and write for the other. On failure, new() sets $! to describe the error and returns nothing. my ($a_read, $a_write, $b_read, $b_write) = POE::Pipe::TwoWay->new(); die $! unless defined $a_read; TYPE may be one of "pipe", "socketpair", or "inet". When set, POE::Pipe::TwoWay will constrain its search to either "pipe()", a UNIX- domain "socketpair()", or plain old sockets, respectively. Otherwise new() will try each method in order, or a particular method predetermined to be the best one for the current operating environment. BUGS
POE::Pipe::OneWay may block up to one second on some systems if failure occurs while trying to create "inet" sockets. SEE ALSO
POE::Pipe, POE::Pipe::OneWay. AUTHOR &; COPYRIGHT POE::Pipe::TwoWay is copyright 2000-2008 by Rocco Caputo. All rights reserved. POE::Pipe::TwoWay is free software; you may redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-05-15 POE::Pipe::TwoWay(3pm)
All times are GMT -4. The time now is 05:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy