05-26-2011
Show us what input you have and what result you need?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
HI all
I have a code like
##############################################
minyear()
{
curryear=$1
echo $curryear
}
##Main Program ##
minyear
exit
#######
when i execute "sh scriptname 2005" output should be like 2005 but the output is blank.
I guess i need to pass parameter to... (3 Replies)
Discussion started by: vasuarjula
3 Replies
2. Shell Programming and Scripting
Hi
I want to pass variables with the NR function in awk command.
test_file1 is input file having 500 records.
var1=100.
var2=200
awk -F" " 'NR >= $var1 && NR <= $var2' test_file1 > test_file2.
My end result should be that test_file2 should have records from line number between... (2 Replies)
Discussion started by: Nishithinfy
2 Replies
3. Shell Programming and Scripting
I need to pass a variable as a parameter from shell script into a DB2 database.
var=bhuk_1123_Q_11/22/09
select * from tbl1 where serial_id='$var';
I have tried executing it using
db2 -tvf scriptname
Somebody please help me out with this. It is throwing an error. Please tell me how... (2 Replies)
Discussion started by: ss3944
2 Replies
4. Shell Programming and Scripting
Hi guys,
can someome help with this question, I have defined a function that takes a command as a parameter, but when the command is executed from the function it will throw errors because what I believe is a special character escaping issue. I tried using the backslash to escape the pipe | and >... (2 Replies)
Discussion started by: marouanix
2 Replies
5. Red Hat
Hi all,
Hereby wish to have your advise for below:
Main concept is
I intend to get current directory of my script file.
This script file will be copied to /etc/init.d.
A string in this copy will be replaced with current directory value.
Below is original script file:
... (6 Replies)
Discussion started by: cielle
6 Replies
6. Shell Programming and Scripting
Hello,
I am trying to execute an SQL query from shell script.
A part of script is something like this:
fromDate=`echo $(date +"%F%T") | sed "s/-//g" | sed "s/://g"`
$ORACLE_HOME/sqlplus -s /nolog <<EOD1
connect $COSDBUID/$COSDBPWD@$COSDBSID
spool... (4 Replies)
Discussion started by: sanketpatel.86
4 Replies
7. Shell Programming and Scripting
Hi Gurus,
I have request which needs to pass position parameter to a function. I tried below simple code, it doesn't work.
#!/bin/bash
func_1(){
echo $1
}
func_1
$ ./set_file abc
$
do I need add some to get the position para first?
thanks in advance. (3 Replies)
Discussion started by: ken6503
3 Replies
8. Shell Programming and Scripting
Hi All,
I have created one function for KSH and was running well with one parameter input since I just had to use $1 to get the parameter.
Now I want to do loop for each parameter(actually filenames) . I have try to use do loop, but $i does not resolve to parameter instead it resolves to 1,... (5 Replies)
Discussion started by: mysocks
5 Replies
9. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
2. Relevant commands, code, scripts, algorithms:
#! /bin/ksh
v="ORG_ID"
... (2 Replies)
Discussion started by: sujitdas2104
2 Replies
10. Shell Programming and Scripting
updateEnvironmentField() {
linewithoutquotes=`echo $LINE | tr -d '"'`
b()
}
I want to pass variable named $linewithoutquotes to another method called b(), which is called from updateEnvironmentField() method. How to do the above requirement with shell script (1 Reply)
Discussion started by: pottic
1 Replies
LEARN ABOUT DEBIAN
tsplay
TSPLAY(1) User Commands TSPLAY(1)
NAME
tsplay - play the given TS or PS file 'at' the nominated host, or to an output file
DESCRIPTION
Play the given file (containing Transport Stream or Program Stream data) 'at' the nominated host, or to an output file. The output is
always Transport Stream. With no switches, tsplay will give a brief summary of its basic usage. Otherwise:
-help detail[s]
Show an expanded version of the help you get if you run tsplay with no arguments
-help ts
Show help specific to playing TS data
-help ps
Show help specific to playing PS data
-help tuning
Show help about how to tune the program's operation
-help test[ing]
Show help on switches that can be useful in testing the target application (the video player)
-help debug[ging] Show help on debugging this application.
-help Show this message
-help all
Show all available help (equivalent to each of the above specific helps, in order)
Otherwise:
-help detail[s]
Show an expanded version of the help you get if you run tsplay with no arguments
-help ts
Show help specific to playing TS data
-help ps
Show help specific to playing PS data
-help tuning
Show help about how to tune the program's operation
-help test[ing]
Show help on switches that can be useful in testing the target application (the video player)
-help debug[ging] Show help on debugging this application.
-help Show this message
-help all
Show all available help (equivalent to each of the above specific helps, in order)
SEE ALSO
The full documentation for tsplay is maintained as a Texinfo manual. Please check http://tstools.berlios.de for more information.
tsplay 1.11 November 2008 TSPLAY(1)