Sponsored Content
Top Forums Shell Programming and Scripting I want to add a variable for the results from the formula of one variable and results of another var Post 303031002 by RudiC on Wednesday 20th of February 2019 10:37:37 AM
Old 02-20-2019
If you want to reuse only $y, not $x, then you could also use

Code:
y="OD_Orders_$(date -d yesterday +%Y-%m-%d).csv"

This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

store awk results in a variable

I try to get the month (of last save) and the filename into a variable, is this possible ? something like this : for month in `ls -la | awk '{print $6}'` do if ] then a=filename of the matching file cp $a /Sep fi thanks, Steffen (1 Reply)
Discussion started by: forever_49ers
1 Replies

2. Shell Programming and Scripting

Grep results to store in a shell variable

I have the results of a grep with -n store in a shell variable ie VAR=`grep -n -e 'PATTERN' file` How ever I am missing the line breaks in the variable , How do I store the resualts of grep with many lines in to a variables. I want the varable should be the sawmway as we do the grep grep... (3 Replies)
Discussion started by: jojan
3 Replies

3. UNIX for Dummies Questions & Answers

Setting the Results of a Command to a Variable

Hi, Hi, I run the command: hostname to get the host back from the server: db201 Now, I need to take that result and set it to a variable. Can anyone help me with this?? I need to be able to use the same script on multiple servers so I do not want to hardcode the hostname result into... (1 Reply)
Discussion started by: stky13
1 Replies

4. UNIX for Dummies Questions & Answers

putting grep -c results number in a variable

I want to display "no results found" if a grep search of a name that the user inputs is not found anywhere in a certain file, Right now I have this, but doesn't seem to work. Im not sure what to change. read name results=grep -c $name file if ; then echo "No results found." exit... (1 Reply)
Discussion started by: busdude
1 Replies

5. UNIX for Dummies Questions & Answers

how to - redirect query results to a variable

How can I send the results of a query to a unix variable. I basically want to run a query then do some logic on the results. Trying to redirect the result into a variable I define in the script. select count(*) as counter from table - nut to redirect the "count" returned from the query... (2 Replies)
Discussion started by: rstone
2 Replies

6. Shell Programming and Scripting

variable getting results from a log file; compare it in an IF cycle

Hi All I am going crazy trying to resolve this easy task.... I have a log file that is created by xcode; and it contains the results of a build (either success or fail); what i am trying to achieve here is to get the result from the log, and check if is a pass or fail in an IF statement, so... (3 Replies)
Discussion started by: newbiez
3 Replies

7. Shell Programming and Scripting

Adding grep'd results in a variable

Here is one I am baffled with; I have not used unix for a while and now that I am back it has been fun remembering and I have enjoyed it, for the most past. this is in ksh. I need to search in a file for the line with X1 and cut columns 20-25, put them into a variable, added them (dollar... (3 Replies)
Discussion started by: CougarMutt
3 Replies

8. UNIX for Advanced & Expert Users

Place the results of a CUT command into a variable

I am being passed a file in UNIX, ie: variable.txt I need to extract the first part of the file content, up to the period, content ie: common_dir.second_output cut -d'.' -f1 /content/stores/variable.txt I then need to utilize the results to create a variable ($1), and test on that... (4 Replies)
Discussion started by: talonbow
4 Replies

9. Programming

Results Of A Variable Into An Array Using C Language

Can C add its results into an array like bash? For example using bash: cat /etc/passwd **truncated for space ** gdm:x:109:118:Gnome Display Manager:/var/lib/gdm:/bin/false mysql:x:110:122:MySQL Server,,,:/nonexistent:/bin/false statd:x:111:65534::/var/lib/nfs:/bin/false... (5 Replies)
Discussion started by: metallica1973
5 Replies

10. Shell Programming and Scripting

awk - saving results of external script to variable.

So, I've been playing with speeding up some analysis we do by using multiple threads of awk (actually, mawk, but code-compatible as far as I use it) on multiple CPU cores. So, I have a big data file and I have several copies of exactly the same processor script, written in mawk. I also have a... (8 Replies)
Discussion started by: treesloth
8 Replies
Excel::Template::Element::Formula(3pm)			User Contributed Perl Documentation		    Excel::Template::Element::Formula(3pm)

NAME
Excel::Template::Element::Formula - Excel::Template::Element::Formula PURPOSE
To write formulas to the worksheet NODE NAME
FORMULA INHERITANCE
Excel::Template::Element::Cell ATTRIBUTES
All attributes a CELL can have, a FORMULA can have, including the ability to be referenced using the 'ref' attribute. CHILDREN
None EFFECTS
This will consume one column on the current row. DEPENDENCIES
None USAGE
<formula text="=(1 + 2)"/> <formula>=SUM(A1:A5)</formula> <formula text="$Param2"/> <formula>=(A1 + <var name="Param">)</formula> In the above example, four formulas are written out. The first two have the formula hard-coded. The second two have variables. The third and fourth items have another thing that should be noted. If you have a formula where you want a variable in the middle, you have to use the latter form. Variables within parameters are the entire parameter's value. AUTHOR
Rob Kinyon (rob.kinyon@gmail.com) SEE ALSO
CELL perl v5.14.2 2010-06-17 Excel::Template::Element::Formula(3pm)
All times are GMT -4. The time now is 06:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy