Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Storing variables and using them.. Post 302432990 by Glyn_Mo on Monday 28th of June 2010 07:57:19 AM
Old 06-28-2010
Question Storing variables and using them..

Hello

Apologies for not having the most accurate of thread titles.. I'm using IBM Rational Synergy CM software. I use the Synergy commands in tandem with Unix commands.

I have a directory containing source code objects:

Code:
bash-3.00$ ccm ls *.fmb *.rdf *.pll *.mmb
cre_applications.fmb-1
cre_error_log.fmb-1
cre_maint_navigator.fmb-1
cre_master.fmb-1
cre_messages.fmb-1
cre_modules.fmb-1
cre_navigator.fmb-1
cre_parameters.fmb-1
cre_roles.fmb-1
cre_run_report.fmb-1
cre_template.fmb-1
cre_users.fmb-2
crer0030.fmb-2
crer0051.fmb-2
crer0054.fmb-2
crer0067.fmb-2
crer0071.fmb-2
david_gui.fmb-0
lmo01808.fmb-1
pay0044.fmb-1
test_x86.fmb-1
david_test.rdf-1
ents_letters_etu.rdf-2
ents_letters.rdf-2
lmo00908.rdf-1
saf10094.rdf-2
test_x86.rdf-1
ccd_common.pll-1
corelib001.pll-1
corelib002.pll-1
entitlements.pll-2
test_x86.pll-1
cre_stdmenu.mmb-1
lmo_syst.mmb-2
xcomp.mmb-1

I also have another directory which contains the execuatables for these source code files. They have different version numbers:

Code:
bash-3.00$ ccm ls
ccd_common.plx-1
corelib001.plx-1
corelib002.plx-1
cre_applications.fmx-1
cre_error_log.fmx-1
cre_maint_navigator.fmx-1
cre_master.fmx-1
cre_messages.fmx-1
cre_modules.fmx-1
cre_navigator.fmx-1
cre_parameters.fmx-1
cre_roles.fmx-1
cre_run_report.fmx-1
cre_stdmenu.mmx-1
cre_template.fmx-1
cre_users.fmx-1
crer0030.fmx-1
crer0051.fmx-1
crer0054.fmx-1
crer0067.fmx-1
crer0071.fmx-1
david_gui.fmx-1
david_test.rep-1
entitlements.plx-1
ents_letters.rep-1
ents_letters_etu.rep-1
lmo00908.rep-1
lmo01808.fmx-1
lmo_syst.mmx-1
pay0044.fmx-1
saf10094.rep-1
test_x86.fmx-1
test_x86.plx-1
test_x86.rep-1
xcomp.mmx-1


I know how to run a command to return just the version number for the source object, but I don't know how to apply it to the executable. I use a Synergy command to change the object version number. I just need to be able to have all the source code version numbers in a variable which I can use in the Synergy command.

Any advice would be must appreciated.
Glyn

Last edited by pludi; 06-28-2010 at 09:17 AM.. Reason: code tags, please...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk - storing data in variables

In AWK script how do I store data in variables for later use. I have a multiline input and I do not want to print the data read on the console Thnaks in advance. Nilotpal. (7 Replies)
Discussion started by: 2nilotpal
7 Replies

2. Shell Programming and Scripting

Splitting the data and storing it into 2 variables

Hi, I have a file in the given format: |aaa |hhh |fat hat chat |make sure I need to get store in a variable,say 'error' the value of the string 'fat hat chat' In short, echo $error should give the result fat hat chat Is this possible using awk? Also, can this be split.For... (10 Replies)
Discussion started by: jisha
10 Replies

3. Shell Programming and Scripting

storing variables in array.Please help

Hi All, I need some help with arrays. I need to take input from the user for hostname, username and password until he enters .(dot) or any other character and store the values in the variable array. I would further connect to the hostname using username and passwd and copy files from server to... (7 Replies)
Discussion started by: nua7
7 Replies

4. Shell Programming and Scripting

Storing commands in $variables.

Hi I'm trying to store commands in variables... like so.. # lastcmd=" $t1 | $t2 | $t3 | $t4 | sort | uniq" t1="sed -e 's/http:/<li><a href=\"http:/'" t2="sed -e 's/http:.*/&\">&<\/a>Web Link<br>/'" t3="sed -e 's/.*. mailto:/<li><a href=\"mailto:/'" t4="sed -e... (7 Replies)
Discussion started by: Paulw0t
7 Replies

5. Shell Programming and Scripting

perl: storing regex in array variables trouble

hi this is an example of code: use strict; use warnings; open FILE, "/tmp/result_2"; my $regex="\\ Starting program ver. (.*)"; my $res="Program started, version <$1> - OK.\n"; while (<FILE>) { if ($_ =~ /($regex)/) { print "$res"; } } close FILE; This finds $regex and print... (3 Replies)
Discussion started by: xist
3 Replies

6. Shell Programming and Scripting

Storing awk output into variables

Hi all, Currently, i have a log file seperated by 'tab' and each record starting with a new line. i managed to retrieve the column that i'm interested in. (source_ip_address: xxx.xxx.xxx.xxx). example of awk output: '{ print $43 }' assuming the field is at column 43. 10.10.10.10... (4 Replies)
Discussion started by: faelric
4 Replies

7. Shell Programming and Scripting

To read data word by word from given file & storing in variables

File having data in following format : file name : file.txt -------------------- 111111;name1 222222;name2 333333;name3 I want to read this file so that I can split these into two paramaters i.e. 111111 & name1 into two different variables(say value1 & value2). i.e val1=11111 &... (2 Replies)
Discussion started by: sjoshi98
2 Replies

8. Shell Programming and Scripting

Storing outputs into variables

I need to know how to store output from one command so that it can initiate another command. chktraf -s | cut -c1-4 output would look like 321 142 256 342 123 Then if the value of the output = 0, then initiate next command. if then for xx in 01 02 03 04 05 06 07 08 09 10 do ... (4 Replies)
Discussion started by: Shaun74
4 Replies

9. Shell Programming and Scripting

Storing the SQL results in array variables

Requirement 1) I need to execute 15 SQL queries in oracle through linux script. All these query results needs to be stored in array variables. Requirement 2) And these 15 queries needs to be executed in parallel. Requirement 3) Once all the queries executed then the shell script should... (3 Replies)
Discussion started by: Niranjancse
3 Replies

10. Shell Programming and Scripting

Using "Find" & Storing To Multiple Variables

Hello all! I'm pretty new to bash scripting, so this should be a pretty easy question to solve. For the last few hours, I've been creating a script that will list some of the following (based on a path I specify): # of directories # of files # of executable files files older than 365... (2 Replies)
Discussion started by: alphekka
2 Replies
FS_QUOTA(1)						       AFS Command Reference						       FS_QUOTA(1)

NAME
fs_quota - Displays the quota used in the volume containing a directory or file SYNOPSIS
fs quota [-path <dir/file path>+] [-help] fs q [-p <dir/file path>+] [-h] DESCRIPTION
The fs quota command displays the percent of quota consumed in the volume that contains each specified directory or file. To display more detailed information about the volume and the partition it resides on, use the fs examine and fs listquota commands. To set volume quota, use the fs setquota or fs setvol command. CAUTIONS
Currently, the maximum size of a volume is 2 terabytes (2^31 bytes). OPTIONS
-path <dir/file path> Names each file or directory for which to display the quota consumed in its parent volume. Partial pathnames are interpreted relative to the current working directory, which is also the default value if this argument is omitted. -help Prints the online help for this command. All other valid options are ignored. OUTPUT
The output reports the percent of volume quota used, in the following format: <percent>% of quota used. EXAMPLES
The following command lists the percent quota used of the volume housing the current working directory: % fs quota 17% of quota used. The following command lists the percent quota used of both the volume housing the current working directory's parent directory and the volume housing the directory /afs/abc.com/usr/smith: % fs quota -path .. /afs/abc.com/usr/smith 43% of quota used. 92% of quota used. PRIVILEGE REQUIRED
The issuer must have the "r" (read) permission on the ACL of the root directory of the volume that houses the file or directory named by the -path argument, and "l" (list) permission on the ACL of each directory that precedes it in the pathname. SEE ALSO
fs_examine(1), fs_listquota(1), fs_setquota(1), fs_setvol(1) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2012-03-26 FS_QUOTA(1)
All times are GMT -4. The time now is 04:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy