01-11-2008
Shell Scripting Question
Hi,
I am assaigning the output to the variable outp and when i try to loop thru the variable i see the original content $OUTPUT also in the array outp.
I dont want to have the original content in the array outp.
Please reply.
outp=$(echo $OUTPUT | awk '{FS = "|"}{
for(i=0;i<NF;i++)
printf(" %s \n",$i);
}')
for variable in $outp
do
echo "==== $variable"
done
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
To anyone who can help greetings,
I am a beginner at Unix shell scripting and am taking a class.
The assignment question is as follows:
use a command-line tool named "itstat" which will display the resolution of an image file and some other lines of information. It accepts a list of image... (1 Reply)
Discussion started by: tech2040
1 Replies
2. Shell Programming and Scripting
To anyone who can help greetings,
I am a beginner at Unix shell scripting.
I need to know how to use the command line tool "itstat".
I understand it's application, however I cannot find any additional information.
Any assistance will be greatly appreciated. (3 Replies)
Discussion started by: tech2040
3 Replies
3. UNIX for Dummies Questions & Answers
Hi all!
I'm a newbie to shell scripting.
I want to create a script that will store a line from a text file in a variable so I can then use it to open firefox with that text in the address bar (the text file contains a list of addresses).
I have tried the following:
#!/bin/sh
a='sed -n 2p... (2 Replies)
Discussion started by: jazzman
2 Replies
4. Shell Programming and Scripting
HI all,
I am attempting to use the scp statemet in a shell script that I am writing
I need to have the user of the script enter a password at the time of the shell script running.I have the following questions?
1) how do i disable the automatic text echo when the user is entering the... (1 Reply)
Discussion started by: Segwar
1 Replies
5. UNIX for Dummies Questions & Answers
Testing for the presence/absence of a pattern in a file, using /bin/sh:
while read a;
do
b="${a##*pattern*}";
;
done < file
This returns 0 if there's a match. That signal ($?) can then be used outside the loop.
However this method reads through the whole file, even if the match... (2 Replies)
Discussion started by: uiop44
2 Replies
6. Shell Programming and Scripting
Hello,
I have a scenario for which I am trying to write a shell script and I have a question regarding the same. Here's the situation:
I am trying to copy a directory which consists of a few sub-directories and .c and .dat extension files say n number of times so that the copied file have... (3 Replies)
Discussion started by: corntown118
3 Replies
7. Shell Programming and Scripting
Hi,
I need to write a script that runs a series of commands in multiple subfolders. The problem is that I dont want to change directory for every folder. So this is why I thought to use a master script to activate the smaller ones.
So, is there a way to command other scripts to open in... (9 Replies)
Discussion started by: Fuyudo
9 Replies
8. Shell Programming and Scripting
Hi guys,
I am wanting to create a script that will logon to HackThisSite.org and complete Programming Mission 11. You can find a link to this mission here for your reference:
www hackthissite org/missions/prog/11/
The following is what I have so far:
#!/bin/bash
USER="myUsername"... (0 Replies)
Discussion started by: spooke
0 Replies
9. Shell Programming and Scripting
hey i have to connect to sql through shell script , then store the value of the query in a variable and then compare it after some time after running a process.
i have used this code but it is not working.
#!/bin/sh
Val = (sqlplus -s rte/rted2@rel76d2 <<!
SELECT MAX(STAT_ID) FROM CVT_STATS;... (3 Replies)
Discussion started by: ramsavi
3 Replies
10. Shell Programming and Scripting
I tried to run a command which simply generates SSH key with out prompting password.
After several trails , got the below command to run the script :
ssh-keygen -t rsa -N "" -f id_rsa
-N "" tells it to use an empty passphrase (the same as two of the enters in an interactive script)
-f... (0 Replies)
Discussion started by: ulaxmi
0 Replies
LEARN ABOUT DEBIAN
net::sip::simple::rtp
Net::SIP::Simple::RTP(3pm) User Contributed Perl Documentation Net::SIP::Simple::RTP(3pm)
NAME
Net::SIP::Simple::RTP - simple RTP handling for Net::SIP::Simple
SYNOPSIS
my $echo_10 = Net::SIP::Simple->rtp( 'media_recv_echo', 'output.pcmu-8000', 10 );
my $announce = Net::SIP::Simple->rtp( 'media_send_recv', 'announce.pcmu-8000', 2 );
DESCRIPTION
This package handles simple RTP stuff for testing and small applications. It provides methods for receiving PCUM/8000 data and for echoing
them back or for sending and receiving PCMU/8000 data.
It's used from method rtp in Net::SIP::Simple.
SUBROUTINES
media_recv_echo ( [ OUTPUT, DELAY ] )
Receives RTP data and echos them back to the sender. If OUTPUT is given it will be used as the file for saving the received data
without the RTP header.
OUTPUT might also be a callback which gets the payload as argument.
If DELAY is >0 the data will not be echoed back immediatly but with an delay of DELAY packets (e.g. with DELAY 10 it will send back
the first packet after it received the 10th packet). If DELAY is <0 the data will not be echoed back. If DELAY is not given or equal
0 the data will be echoed back immediatly.
If no traffic comes in for more then 10 seconds it will hang up the call because of inactivity.
media_send_recv ( INPUT, [ REPEAT, OUTPUT ] )
Will read data from file INPUT and send them as RTP to peer. It will assume that each data block in INPUT consists of 160 bytes, which
is right for PCMU/8000 without RTP header. The RTP header will be added to the data.
If it reaches the end of the file it will stop unless REPEAT is given in which case it will repeat the sending REPEAT times (if REPEAT
is less 0 it will repeat forever e.g. until the other party hangs up). On stopping it will invoke the callback cb_rtp_done from the
connection params for the Net::SIP::Simple::Call or if this is not given it will close the call by issuing a BYE.
INPUT might also be a callback usable by invoke_callback in Net::SIP::Util which returns the data to send. In this case REPEAT is not
used.
Incoming data will be written to the optional OUTPUT file like in media_recv_echo. The content from OUTPUT has the same format as INPUT
or OUTPUT from media_recv_echo.
OUTPUT might also be a callback which gets the payload as argument.
If no traffic comes in for more then 10 seconds it will hang up the call because of inactivity.
perl v5.14.2 2009-01-23 Net::SIP::Simple::RTP(3pm)