Sponsored Content
Top Forums Shell Programming and Scripting Passing the command line argument in a variable Post 51639 by jim mcnamara on Wednesday 26th of May 2004 03:02:59 PM
Old 05-26-2004
Code:
var1=`ls -1t | head -1`

Those are backticks...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

passing a command line argument

I have a shell script which does the encryption of a file where i am passing the file name as a command line argument,but later on the script waits on the screen to enter Y or N what is the command i should be using on the shell script #!/bin/bash -x outfilename=file.out echo... (8 Replies)
Discussion started by: rudoraj
8 Replies

2. Programming

Need help in storing command line argument argv[2] to a variable of int type

The following program takes two command line arguments. I want the second argument (fileCount) to be stored/printed as a int value. I tried my best to typecast the char to int (check the printf statement at last) but is not working...the output is some junk value. This program is in its... (3 Replies)
Discussion started by: frozensmilz
3 Replies

3. Shell Programming and Scripting

Need Help with the argument passing Through Command line

$$$$$ (5 Replies)
Discussion started by: asirohi
5 Replies

4. UNIX for Dummies Questions & Answers

Passing command line argument between shell's

Hi, I am facing a problem to pass command line arguments that looks like <script name> aa bb "cc" dd "ee" I want to pass all 5 elements include the " (brackets). when I print the @ARGV the " disappear. I hope I explain myself Regards, Ziv (4 Replies)
Discussion started by: zivsegal
4 Replies

5. Shell Programming and Scripting

Pass command line argument to variable

Hi, I had written a shell script to pass command line argument to variable in a function. Here is my code: main if ; then .$1 echo $1 get_input_file else echo "input file $1 is not available" fi get_input_file() { FILE = "$1" echo $FILE } (10 Replies)
Discussion started by: Poonamol
10 Replies

6. Shell Programming and Scripting

Passing value as a command line argument in awk script.

I have one working awk command line. Which taking data from the “J1202523.TXT” file and generating the “brazil.dat” file. PFB code. awk '{ DUNS = substr($0,0,9);if ( substr($0,14,3) == "089" ) print DUNS }' J1202523.TXT > Brazil.dat But now I want to pass two parameter as a command line argument... (4 Replies)
Discussion started by: humaemo
4 Replies

7. UNIX for Advanced & Expert Users

Passing full path as argument when it contains variable strings

Hi, In directory "inoutfiles", I have folders fold0001, fold0002 and so on. Every folder has corresponding file file0001.txt, file0002.txt and so on. I want to perform a certain action on multiple files in one go. The cpp file is in the same directory as "inoutfiles". This is my code : ... (0 Replies)
Discussion started by: KidD312
0 Replies

8. Shell Programming and Scripting

Passing Command Line Args in a Single Variable?

Hello All, I have a Bash Script and an Expect script that together will SSH to another server and do some stuff there... From within the Bash Script I process the Command Line Arguments, which are Required Args and Optional Args. When I call the Expect script from the Bash Script, I pass... (4 Replies)
Discussion started by: mrm5102
4 Replies

9. Shell Programming and Scripting

Passing the value of variable which is read from command line in called script

Hi, I am calling a Perl script in my shell script. When Perl script is executed it asks for a answer to be entered by user from terminal. How can i pass that value from my shell script ?? I know I can change perl script to default the answer but i dont have access to do that so only option i... (5 Replies)
Discussion started by: varun22486
5 Replies

10. Shell Programming and Scripting

Passing variable as an argument to another script

Hi, I am trying to pass a variable as an argument to another script. While substitution of variable, I am facing a problem. varaiable "a" value should be -b "FPT MAIN". When we pass "a" to another script, we are expecing it to get substitue as ./test.sh -b "FPT MAIN". But, it is getting... (9 Replies)
Discussion started by: Manasa Pradeep
9 Replies
MYSQLI_STMT(3)								 1							    MYSQLI_STMT(3)

The mysqli_stmt class

INTRODUCTION
Represents a prepared statement. CLASS SYNOPSIS
mysqli_stmt mysqli_stmt Properties o int$mysqli_stmt->affected_rows o int$mysqli_stmt->errno o array$mysqli_stmt->error_list o string$mysqli_stmt->error o int$mysqli_stmt->field_count o int$mysqli_stmt->insert_id o int$mysqli_stmt->num_rows o int$mysqli_stmt->param_count o string$mysqli_stmt->sqlstate Methods o mysqli_stmt::__construct (mysqli $link, [string $query]) o int mysqli_stmt::attr_get (int $attr) o bool mysqli_stmt::attr_set (int $attr, int $mode) o bool mysqli_stmt::bind_param (string $types, mixed &$var1, [mixed &$...]) o bool mysqli_stmt::bind_result (mixed &$var1, [mixed &$...]) o bool mysqli_stmt::close (void ) o void mysqli_stmt::data_seek (int $offset) o bool mysqli_stmt::execute (void ) o bool mysqli_stmt::fetch (void ) o void mysqli_stmt::free_result (void ) o mysqli_result mysqli_stmt::get_result (void ) o object mysqli_stmt::get_warnings (mysqli_stmt $stmt) o mixed mysqli_stmt::prepare (string $query) o bool mysqli_stmt::reset (void ) o mysqli_result mysqli_stmt::result_metadata (void ) o bool mysqli_stmt::send_long_data (int $param_nr, string $data) o bool mysqli_stmt::store_result (void ) PHP Documentation Group MYSQLI_STMT(3)
All times are GMT -4. The time now is 12:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy