10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
Could you please help me, why sed is not able to take variable value when I try to replace using sed.
I want to replace 2nd column (time) and keeping intact others.
cur="09:30"
CODE="VL"
new="09:35"
sed s/'\(.*def.monitor."${CODE}".qStart.*\)"${cur}"\(.*read\)/\1"${new}"\2'/g... (3 Replies)
Discussion started by: sdosanjh
3 Replies
2. Shell Programming and Scripting
Hi,
I am new to unix/linux scripting.
I have a text file, listlib.txt where the content:
lib1_23
lib34_a
ab_li_lab
I need to generate a file (.log) of each cell. I am planning to create a (.csh) script that will have for loop with variable taken from listlib.txt. As for now, i have no... (4 Replies)
Discussion started by: mmaz
4 Replies
3. UNIX for Dummies Questions & Answers
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)
Discussion started by: tricampeon81
8 Replies
4. Shell Programming and Scripting
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)
Discussion started by: API
9 Replies
5. Shell Programming and Scripting
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)
Discussion started by: gnnsprapa
2 Replies
6. UNIX for Dummies Questions & Answers
Hi
I am trying to remove some characters from my data file.
The data file has huge number of records say 90000 records.
I am using sed for this purpose.
eg :
cat FILENAME|sed 's/;//g' (to remove semi colon ';')
However as the data file is too huge , it is taking too much time to give... (3 Replies)
Discussion started by: dashing201
3 Replies
7. Shell Programming and Scripting
Hi all,
I'll try to get a result from a search with "awk" into a variable.
It works for those examples:
findfirstline=`awk 'BEGIN{ mycount = 1 } { if(mycount == 1 && /^Video/){ row=NR; print row; mycount = 0; }}' ${i}`
findlastline=`awk '/^Video/ {row=NR} END{print row}' ${i}`
But it... (6 Replies)
Discussion started by: tempestas
6 Replies
8. Shell Programming and Scripting
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)
Discussion started by: temhem
2 Replies
9. Shell Programming and Scripting
Hi,
I'm quite new to scripting and I want to modify following line of an existing script:
MYVAR=`subst |grep 'L:\\\:' | sed -e 's/.*\\\//'`;
What I have to do is to use the content of a variable instead of the constant expression 'L:\\\:' as the grep string to be matched.
Assuming I already... (5 Replies)
Discussion started by: snowbiker99
5 Replies
10. Shell Programming and Scripting
Hi,
I am trying to export some 50 tables and i want to write a loop and execute the script for every table. I did for one table and its running. Can any one help me for setting a loop and running the script for all the tables
thanks (6 Replies)
Discussion started by: srichunduru
6 Replies