The process_line function seems to read from stdin, i.e. the same stream as the read command reads from.
Redirect stdin
Or fix the process_line function.
This User Gave Thanks to MadeInGermany For This Post:
I'm trying to write a ksh script that uses awk, but I want to pass variables to awk. For example (not working):
if ];then
searchstr=$1
lsof -i | awk '{if($9~/SEARCHSTR/) print $2} SEARCHSTR=$searchstr'
else
echo "usage: $0 <search string>"
fi
I tried several options. Is it... (3 Replies)
Hi,
I have a function that hold 3 arrayies.
I need to pass them to another function as an input, for further use
Could you please explain how to do that.
Thanks (5 Replies)
How do i get the value of the variable from the called script(script2) to the calling script(script1) in ksh ?
I've given portion of the script here to explain the problem.
Portion of Script 1
=============
-----
-----
tmp=`a.ksh p1 p2 p3`
if then
# error processing
fi
-----... (10 Replies)
Hi, i need help passing variables to sed using ksh.
My goal is to get particular data from log files.
first i put a mark to the log files.
echo "TEST_"`date + %m_%d_%Y_%T"` >markFile
this will produce a 'markFile' which contain text like this
TEST_06_01_2009_21:55:09
then i put the mark... (2 Replies)
Let me know if there is a way to pass array to a funtion in ksh script.
function isPresent
{
typeset member
member=$1
dbList=$2
echo '$1:' $1
echo '$2' $dbList
The array will be at the second position....something like this
isPresent 12 <array>
if
then
echo... (3 Replies)
Hi,
I 'm trying to send an e-mail for every different line in the .txt
for i in {1..$variable}
do
sed -n "/$i$/p" text.txt
done
I have two problems about this.
First one is that for loop doesn't work
and the second one is that i cant get the output of sed (4 Replies)
Hi,
I am trying to use a database to store configurations in an environment definition scripts to make the configurations easily modifiable. (long story short - it is an easier process to make changes in the db than trying to deploy a file). The values will be stored in the database in the... (1 Reply)
I have an for loop that reads the following file
cat param.cfg
val1:env1:opt1
val2:env2:opt2
val3:env3:opt3
val4:env4:opt4
.
.
The for loop extracts the each line of the file so that at any one point, the value of i is
val1:env1:opt1 etc...
I would like to extract each... (19 Replies)
Using ksh to call a function which has awk script embedded.
It parses a long two element list file, filled with text numbers (I want column 2, beginning no sooner than line 45, that's the only known thing) . It's unknown where to start or end the data collection, dynamic variables will be used. ... (1 Reply)
I have many printer queues to be created in AIX 6.1. I can create printers with this line:
/usr/lib/lpd/pio/etc/piomkjetd mkpq_jetdirect -p 'hplj-4000' -D pcl -q 'emg1' -D ps -q 'emg1ps' -h 'emg1' -x '9100'
But, I like to feed the printer queue data, called "printfeed", so that I can... (8 Replies)
Discussion started by: Daniel Gate
8 Replies
LEARN ABOUT DEBIAN
ts2es
TS2ES(1) User Commands TS2ES(1)NAME
ts2es - extract a single (elementary) stream from a TS (or PS)
SYNOPSIS
ts2es [switches] <infile> <outfile>
DESCRIPTION
TS tools version 1.11, ts2es built Nov 11 2008 17:15:45
Extract a single (elementary) program stream from a Transport Stream (or Program Stream).
Files:
<infile>
is an H.222 Transport Stream file (but see -stdin and -pes)
<outfile> is a single elementary stream file (but see -stdout)
Which stream to extract:
-pid <pid>
Output data for the stream with the given <pid>. Use -pid 0x<pid> to specify a hex value
-video Output data for the (first) video stream named in the (first) PMT. This is the default.
-audio Output data for the (first) audio stream named in the (first) PMT
General switches:
-stdin Input from standard input, instead of a file
-stdout
Output to standard output, instead of a file Forces -quiet.
-verbose, -v
Output informational/diagnostic messages
-quiet, -q
Only output error messages
-max <n>, -m <n>
Maximum number of TS packets to read
-pes, -ps
Use the PES interface to read ES units from the input file. This allows PS data to be read (there is no point in using this for TS
data). Does not support -pid, -stdin or -stdout.
TS tools version 1.11, ts2es built Nov 11 2008 17:15:45
Extract a single (elementary) program stream from a Transport Stream (or Program Stream).
Files:
<infile>
is an H.222 Transport Stream file (but see -stdin and -pes)
<outfile> is a single elementary stream file (but see -stdout)
Which stream to extract:
-pid <pid>
Output data for the stream with the given <pid>. Use -pid 0x<pid> to specify a hex value
-video Output data for the (first) video stream named in the (first) PMT. This is the default.
-audio Output data for the (first) audio stream named in the (first) PMT
General switches:
-stdin Input from standard input, instead of a file
-stdout
Output to standard output, instead of a file Forces -quiet.
-verbose, -v
Output informational/diagnostic messages
-quiet, -q
Only output error messages
-max <n>, -m <n>
Maximum number of TS packets to read
-pes, -ps
Use the PES interface to read ES units from the input file. This allows PS data to be read (there is no point in using this for TS
data). Does not support -pid, -stdin or -stdout.
SEE ALSO
The full documentation for ts2es is maintained as a Texinfo manual. Please check http://tstools.berlios.de for more information.
ts2es 1.11 November 2008 TS2ES(1)