Sponsored Content
Top Forums Shell Programming and Scripting Problem with * when pass into variable. Post 302341997 by zaxxon on Friday 7th of August 2009 06:21:28 AM
Old 08-07-2009
Code:
$> VAR=*
$> echo "${VAR}"
*

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to pass a variable to Awk ?

I am trying to pass 2 shell variable's ("START" and "END") define earlier in the script to this awk statement, but i can't seem to pass it on. PLs help. set START = xxxx set END = yyyy set selected_file = `awk '/$START/,/$END/' filename` (24 Replies)
Discussion started by: Raynon
24 Replies

2. UNIX for Dummies Questions & Answers

How do I pass a variable to awk?

I have an awk statement where I Need to pass an environment variable but I cannot get it to work: My evironment varible examples below: $FILE1=/dev/fs/file.new $FILE2=/dev/fs/file.old Code below: awk -F"|" ' BEGIN { while( getline < "$FILE1" ) { arr=1 } } arr != 1 { print } '... (12 Replies)
Discussion started by: eja
12 Replies

3. Shell Programming and Scripting

how to pass variable to grep?

Hi I have a such conditional: SPAMH="it is SPAM" if grep -q $SPAMH $NMDIR/$mail; then SPAMHFLAG=1 else SPAMHFLAG=0 fi And grep doesn't catch this string, even it exists there. I think it's a problem with passing $SPAMH to grep. I tried... (2 Replies)
Discussion started by: xist
2 Replies

4. UNIX for Dummies Questions & Answers

How To Pass an Array Variable

Hi, I have a master BASH shell script where I define a bunch of variables: $var1=why $var2=is $var3=(this so hard) I would then like to call another shell script and pass these variables to it: $script2 $var1 $var2 $var3 This works fine for var1 and var2. However, var3 is an array,... (9 Replies)
Discussion started by: msb65
9 Replies

5. Shell Programming and Scripting

Pass variable to sql

Please help. I got these error. I'm try to pass variable extract from data-file.txt to sql file(select.sql). cat: cannot open select cat: cannot open * cat: cannot open from cat: cannot open user cat: cannot open where cat: cannot open name=$list; #!/bin/bash list=`sed q... (3 Replies)
Discussion started by: killboy
3 Replies

6. Programming

How to pass table_name as variable

i need to delete the data from all the tables where a column appears Eg column_name = ABCD Now i do get all the tables where a column like ABCD appears and stores it in another table say temp There are around 800+ tables i get so my temp table has two fields table_name column_name now i... (1 Reply)
Discussion started by: mad_man12
1 Replies

7. Shell Programming and Scripting

How to pass a function with a variable parameter into another variable?

Hello again :) Am currently trying to write a function which will delete a record from a file. The code currently looks as such: function deleteRecord() { clear read -p "Please enter the ID of the record you wish to remove: " strID ... (2 Replies)
Discussion started by: U_C_Dispatj
2 Replies

8. Red Hat

How to pass value of pwd as variable in SED to replace variable in a script file

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

9. Shell Programming and Scripting

How to pass variable to a query?

Hi All, How to pass date variable to a query? I have tried the below one , but it's not working. ost.ksh #!/bin/ksh v_date=$1 var=$(sqlplus -s $ORACON <<ENDOFSQL SELECT TO_DATE('$v_date','DD-MON-YYYY'),-1) FROM DUAL; exit; ENDOFSQL ) #End I have executed as below. (7 Replies)
Discussion started by: ROCK_PLSQL
7 Replies

10. UNIX for Beginners Questions & Answers

Need to pass variable in a command and assign value to a variable

Hello All, Hope you're doing well ! I am trying below command to be passed in a shell script, header_date_14 is a variable and $1 is the name of a file I intend to pass as a command line argument, however command line argument is not being accepted. header_date_14=$(m_dump... (8 Replies)
Discussion started by: ektubbe
8 Replies
GIT-VAR(1)							    Git Manual								GIT-VAR(1)

NAME
       git-var - Show a Git logical variable

SYNOPSIS
       git var ( -l | <variable> )

DESCRIPTION
       Prints a Git logical variable.

OPTIONS
       -l
	   Cause the logical variables to be listed. In addition, all the variables of the Git configuration file .git/config are listed as well.
	   (However, the configuration variables listing functionality is deprecated in favor of git config -l.)

EXAMPLE
	   $ git var GIT_AUTHOR_IDENT
	   Eric W. Biederman <ebiederm@lnxi.com> 1121223278 -0600

VARIABLES
       GIT_AUTHOR_IDENT
	   The author of a piece of code.

       GIT_COMMITTER_IDENT
	   The person who put a piece of code into Git.

       GIT_EDITOR
	   Text editor for use by Git commands. The value is meant to be interpreted by the shell when it is used. Examples: ~/bin/vi,
	   $SOME_ENVIRONMENT_VARIABLE, "C:Program FilesVimgvim.exe" --nofork. The order of preference is the $GIT_EDITOR environment variable,
	   then core.editor configuration, then $VISUAL, then $EDITOR, and then the default chosen at compile time, which is usually vi.

       GIT_PAGER
	   Text viewer for use by Git commands (e.g., less). The value is meant to be interpreted by the shell. The order of preference is the
	   $GIT_PAGER environment variable, then core.pager configuration, then $PAGER, and then the default chosen at compile time (usually
	   less).

SEE ALSO
       git-commit-tree(1) git-tag(1) git-config(1)

GIT
       Part of the git(1) suite

Git 2.17.1							    10/05/2018								GIT-VAR(1)
All times are GMT -4. The time now is 01:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy