7 More Discussions You Might Find Interesting
1. Programming
I wonder string constant exists permanently or temporary.
For example,
printf("hello, world");
the function printf access to it is through a pointer. Does it mean storage is allocated for the string constant to exist permanently in memory? :confused: (4 Replies)
Discussion started by: kris26
4 Replies
2. Shell Programming and Scripting
Hi All !
I am just trying to print bash variable in awk statement as string
here is my script
n=1
for file in `ls *.tk |sort -t"-" -k2n,2`; do
ak=`(awk 'FNR=='$n'{print $0}' res.dat)`
awk '{print "'$ak'",$0}' OFS="\t" $file
n=$((n+1))
unset ak
doneI am getting following error
awk:... (7 Replies)
Discussion started by: Akshay Hegde
7 Replies
3. Shell Programming and Scripting
Hey guys,
I know that title is a mouthful - I'll try to better explain my struggles a little better...
What I'm trying to do is:
1. Query a db and output to a file, a list of column data.
2. Then, for each line in this file, repeat these values but wrap them with:
ITEM{
... (3 Replies)
Discussion started by: ampsys
3 Replies
4. Shell Programming and Scripting
Hi ,
I have below file with 13 columns. I need 2-13 columns seperated by comma and I want to append each row with a string "INSERT INTO xxx" in the begining as 1st column and then a variable "$node" and then $2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13 and at the end another string " ; COMMIT;"
... (4 Replies)
Discussion started by: Vaddadi
4 Replies
5. Shell Programming and Scripting
Hallo
I have maybe a little bit advanced request....
I need to choose one random part betwen %....
so i have this..
%
text1 text1 text1
text1 text1 text1
text1 text1 text1
%
text2 text2
text2 text2 text2
%
text3 text3 text3
tetx3
%
this choose text between %
awk ' /%/... (8 Replies)
Discussion started by: sandwich
8 Replies
6. Programming
In a declaration, I have:
const char comment_begin = "<!--";
const char comment_end = "-->";
const int comment_begin_len = strlen(comment_begin);
const int comment_end_len = strlen(comment_end);
When I compile, I get the warnings:
emhttpc.c:64: warning: initializer element is not... (10 Replies)
Discussion started by: cleopard
10 Replies
7. Shell Programming and Scripting
Hi,
I need to append string "Hi" to the beginning of the lines containing some specific string. How can I achieve that?
Please help.
Malay (1 Reply)
Discussion started by: malaymaru
1 Replies