Sponsored Content
Top Forums Shell Programming and Scripting assigning two variables in bourne shell Post 302547772 by razen on Tuesday 16th of August 2011 02:10:18 PM
Old 08-16-2011
suppose the output of a select query is two fields : 546 3003; these two values should be assigned as variables in a update query;
< select br_cd,txn_id from ttable > the output will be 546 3003.
these two variables should be applied in a update query
< update utable set ... where br_cd= and txn_id= . like that without splitting
by awk.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

assigning variables

Before I even attempt this, is it possible to grep for a pattern, maybe a partial sentence like "go to page 3", assign that to a variable and then use awk or something to pull out the 3 and assign it to a variable? So first I would have Gotopg = "go to page 3" then page = 3 (9 Replies)
Discussion started by: k@ssidy
9 Replies

2. UNIX for Advanced & Expert Users

assigning variables to their defaults

Hi, Is there any way to assign defaults values to the shell variables without reassigning them ( restarting the session) for example after login the value of ORACLE_HOME=/a/b/c i have changed this value from the console export ORACLE_HOME=/c/d now what if i want the value exported to... (1 Reply)
Discussion started by: clx
1 Replies

3. Shell Programming and Scripting

variables not assigning in a function

Hi GUYS, I have function. I am assigning a line count to count variable. But it is throwing an error at this line. function_recur (){ #file being created in this function lenth = `wc -l function_outpu.dat`; echo $lenth; } this is the error i got rec.ksh: lenth: not found. ... (3 Replies)
Discussion started by: mac4rfree
3 Replies

4. UNIX for Dummies Questions & Answers

Assigning variables using awk

Hi, I am having a line which is separated by - I need to extract each field and put into some variable. a=`echo "this-is-the-case" | awk -F- '{print $1}' ` b=`echo "this-is-the-case" | awk -F- '{print $2}' ` c=`echo "this-is-the-case" | awk -F- '{print $3}' ` d=`echo "this-is-the-case" | awk... (2 Replies)
Discussion started by: posix
2 Replies

5. Shell Programming and Scripting

assigning fields variables value to shell variable

suppose I have a file named abc.txt.The contents of the file is sited below abc.txt maitree,test,test3 Using awk command can I store these 3 values in 3 different variable and in one single line command of awk. suppose variable a b c is there. I don't want like this a=`awk -F"," '{print... (2 Replies)
Discussion started by: maitree
2 Replies

6. Shell Programming and Scripting

Help with reading and assigning variables

Hi Gurus, I have a file named log with 2 lines Each line is a file name. eg $ cat log monday tuesday I need to read log and assign each output(filename) to a different variable. The following doesn't work:- while read A B do echo " a is ${A} " echo " b is ${B} " done <... (6 Replies)
Discussion started by: wisdom
6 Replies

7. UNIX for Dummies Questions & Answers

Variables and math in Old skool Bourne Shell

Hey everybody, I've been searching google and these forums and have found some solutions to the issues I've been having today within the OLD Bourne Shell. I am following chapter 6 of the Guide to Unix using Linux 4th Edition. I am working on some basic calculations with variables in the BASH... (3 Replies)
Discussion started by: mr.rhtuner
3 Replies

8. Shell Programming and Scripting

Assigning variables

i have variables RECIPIENTS_DEVL,RECIPIENTS_UACC,RECIPIENTS_PROD i have a case statement to get the phase variable: case ${WMD_UPHASE1} in u) WMD_UPHASE4=UACC;; i) WMD_UPHASE4=DEVL;; p) WMD_UPHASE4=PROD;; d) WMD_UPHASE4=DEVL;; *) WMD_UPHASE4=DEVL;; esac I am unable to... (3 Replies)
Discussion started by: Arun Mishra
3 Replies

9. Shell Programming and Scripting

Assigning Variables

Hi, Can the below be clarified please. i just want to know what is the difference between the two ways of assigning variables as mentioned below. export SRC_TBL=${SRC_TBL-"MMA_COPAY_PLN_FACT_STG"} export SRC_TBL="MMA_COPAY_PLN_FACT_STG" thanks in advance :) Arun (1 Reply)
Discussion started by: Arun Mishra
1 Replies
gtk-update-icon-cache(1)					   User Commands					  gtk-update-icon-cache(1)

NAME
gtk-update-icon-cache - Icon theme caching utility SYNOPSIS
gtk-update-icon-cache [--force] [--help] [--ignore-theme-index] [--index-only] [--source=name] [--quiet] [--validate] [iconpath] DESCRIPTION
gtk-update-icon-cache creates cache files for icon themes that can be used with mmap(2). It expects to be given the path to an icon theme directory containing an index.theme file, e.g. /usr/share/icons/hicolor, and writes a icon-theme.cache containing cached information about the icons in the directory tree below the given directory. GTK+ can use the cache files created by gtk-update-icon-cache to avoid a lot of system call and disk seek overhead when the application starts. Since the format of the cache files allows them to be mmap()ed shared between multiple applications, the overall memory consumption is reduced as well. OPTIONS
The following options are supported: -f, --force Overwrite an existing cache file even if it appears to be up to date. -?, --help Show help options. -t, --ignore-theme-index Do not check for the existence of 'index.theme' in the icon theme directory. Without this option, gtk- update-icon-cache refuses to create an icon cache in a directory which does not appear to be the toplevel directory of an icon theme. -i, --index-only Do not include image data in the cache -c, --source=name Output a C header file declaring a constant name with the contents of the icon cache. -q, --quiet Turn off verbose output. -v, --validate Validate existing icon cache. OPERANDS
The following operands are supported: iconpath The path to an icon theme directory containing an index.theme file. ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of gtk-update-icon-cache: NLSPATH. EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/gtk-update-icon-cache The command-line executable for the application. /usr/share/icons System icon directory /usr/share/gtk-doc/html/gtk Location of developer documentation ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-base-libs | +-----------------------------+-----------------------------+ |Interface stability |Committed | +-----------------------------+-----------------------------+ SEE ALSO
gdk-pixbuf-csource(1), gdk-pixbuf-query-loaders(1), gettext(1), glib-genmarshal(1), glib-gettextize(1), glib-mkenums(1), gobject-query(1), gtk-query-immodules-2.0(1), mmap(2). libgtk-x11-2.0(3), attributes(5), environ(5) Latest version of the GNOME Desktop User Guide for your platform. NOTES
Written by Brian Cameron, Sun Microsystems Inc., 2003, 2006, 2007. SunOS 5.11 21 Nov 2007 gtk-update-icon-cache(1)
All times are GMT -4. The time now is 03:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy