Trying to compute the number of records that start with "Video" based on first and last observed won't work here -- you have records mixed in with the Video records such that last - first will be greater than 80.
If all you need is a count of records that begin with "Video" this might be better:
If you must use awk:
Both of these assume Kshell or bash where back-quotes are deprecated in favour of $(cmd).
Hi ,
I am trying following .
I need to get a result of an autosys cmd into a unix variable.
The autosys cmd is
autostatus -G jpm_day_today
Please help me in storing the value returned by this cmd into a unix variable.
Appreciate your time to read this post. (1 Reply)
For whatever reason I cant seem to fix my syntax to do the following. I want to run a grep and count how many instances come up and store that number in a variable but I keep erroring out. Here's my code in bash:
number=grep blah file.txt | wc -l (1 Reply)
Hi friends,
firstly, i can run following expression and i took 100 value.
sqlplus -s username/password@TTTEST @umt.sql
umt.sql exists "select t.deger from parametre t where t.id=30".
result of this query =100
i need to assign this value(100) to variable(for example x... (2 Replies)
Hi All,
How can i take the following code having three seds into a variable :
echo "$DateFileFormat" | sed 's/\./\\\\./g' | sed 's/\$/+/g' | sed 's/\#/'$job_date'/g'
I want to get the result stored in a script variable
i tried
var2=`echo "$DateFileFormat" | sed 's/\./\\\\./g' |... (4 Replies)
In a directory i have a file *output* whose contents are changing for every simulation.
zgrep "trace file is" *output* | zgrep g
o/p: trace file is Int_01.1352176388z4f56ec33.0.trace.gz
I want to extract "Int_01.1352176388z4f56ec33.0.trace.gz" from the above result into a variable.
i... (2 Replies)
Hi,
i have two variables i.e
lck_ckm_customer=ckm_customer and(present in some script A)
table=ckm_customer(present in script B)
in script B i am executing this part
if ; then
---
----
----
fi
Now, while comparing in my log file i am getting this result
if
but i... (2 Replies)
Hi All,
I am looking for a solution. I am executing below command in shell script:
SQL= "select count(*) from dual"
sqlcmd --login /oracle/baccess.xml --sql "$SQL".
I can see the result while executing above shell script. but I want to store the value of query output irrespective the... (2 Replies)
Hello,
I would like to have a result of a cut-command in a variable.
The file "t.dat" has the following content:
Company 001.239879123.OB1X.672W12.STS UNOLD.001.02
My bash-script:
Header=""
Header=$(cut -c1-160 t.dat | head -1)
echo $Header
... (9 Replies)
I have friends that this command worked perfectly, but I would like to save the result in a variable, which I have not achieved
var=prueba.txt
echo $var | cut -d "." -f 1
prueba
I need to do this but does not work me
salida=echo $var | cut -d "." -f 1
echo "result:$salida"
... (8 Replies)