10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Here is the whole script, very simple, but I am just learning
ROK_NO=$1
RPT=/tmp/test
sed -E '/^SELECT/ s/(.{23}).{8}/\1'"$ROK_NO"' /' $RPT
echo $RPT
When I run this I get
$ bash rok.sh 2388085
: No such file or directory
/tmp/test
When I type the command in console, it works... (3 Replies)
Discussion started by: isey78
3 Replies
2. Shell Programming and Scripting
Hello!
I have a problem to insert variables with sed... And I can't find the solution. :confused:
I would like to display one/few line(s) between 2 values.
This line works well
sed -n '/Dec 12 10:42/,/Dec 12 10:47/p'
Thoses lines with variables doesn't work and I don't find the... (2 Replies)
Discussion started by: Castelior
2 Replies
3. Shell Programming and Scripting
i have a datafile that has several lines that look like this:
2,dataflow,Sun Mar 17 16:50:01 2013,1363539001,2990,excelsheet,660,mortar,660,4
using the following command:
awk -F, '{$3=strftime("%a %b %d %T %Y,%s",$3)}1' OFS=, $DATAFILE | egrep -v "\-OLDISSUES," | ${AWK} "/${MONTH} ${DAY}... (7 Replies)
Discussion started by: SkySmart
7 Replies
4. Programming
I am using this code:
g_signal_connect(showapp_option, "activate", G_CALLBACK(&MainWindow::show_app), appindicator);
so as to connect my indicator menu item to the function show_app(), and it works just fine, irregardless the fact that I get the following warning:
warning: converting from... (11 Replies)
Discussion started by: hakermania
11 Replies
5. Shell Programming and Scripting
Hello, I am a new joiner to the forum, and have what i hope is a simple question, however I can't seem to find the answer so maybe it is not available within bash scripting.
I intend to use the below script to archive files from multiple directories at once by using a loop, and a variable (n)... (10 Replies)
Discussion started by: dring
10 Replies
6. Shell Programming and Scripting
Hello,
I have a tricky problem:
I have a $file with a variable number of occurrences of "ORA-" (in this case two)
..........
EXP-00008: ORACLE error 3113 encountered
ORA-03113: end-of-file on communication channel
EXP-00056: ORACLE error 1403 encountered
ORA-01403: no data found... (9 Replies)
Discussion started by: Laurentiu
9 Replies
7. Shell Programming and Scripting
I can't believe I can't figure this out... given this code:
CARS_DATA_LIST=`cat /tmp/file1 | awk '{print $1}' `
FMSA_DATA_LIST=`cat /tmp/file2 | awk '{print $1}' `
The value of each of the above variables is:
CARS = a b c d e f g
FMSA = a b c q r s
I want to declare a third... (8 Replies)
Discussion started by: Shoeless_Mike
8 Replies
8. Shell Programming and Scripting
Hi,
I've a problem with wariables in awk.
My example:
$ cat test.txt
12|aaaa
13|bbbb
012|cccc
0123|dddd
$ cat test.awk
$1 == var {print $0}
$ cat test.sh
/usr/xpg4/bin/awk -F"|" -v var="012" -f test.awk test.txt (5 Replies)
Discussion started by: apresa
5 Replies
9. Solaris
hi ,
i have a problem in setting value of $TERM variable in solaris while installing the SUN SPARCT1 simulation environment on ma pc so some one plkease guide me i have attached a snapshot of my error below thankew (1 Reply)
Discussion started by: Naughtydj
1 Replies
10. Shell Programming and Scripting
hi all ,
i wanted to know if someone knows how can i use
a variable inside another variable
e.g.
#!/bin/csh
foreach test(1 2 3)
set sta_$test = "2"
##now its the problem i want to echo the new var
#$sta_$test , each time with anothe num ($test = 1... (2 Replies)
Discussion started by: udi
2 Replies