Thursday, 1 December 2011

Rubberman! Newest Member 8,000 post Club!

Rubberman! Newest Member 8,000 post Club!

If there is such a club existing in LF!

Congratulations for making such number of post. I was one who have benefited from your helps. And to think we started at the same date.

Thank you, my guru!!!

Have some :banana::banana::banana::banana:

Bash shell script: Str(007) to int(7),increment it(8) & convert back t

Bash shell script: Str(007) to int(7),increment it(8) & convert back t

Hi,
I have the following requirement.

There will be following text/line in a file (eg: search-build.txt)
PRODUCT_VERSION="V:01.002.007.Build1234"

I need to update the incremental build number (eg here 007) every time I give a build through script. I am able to search the string and get the item.
Quote:

rexpression_sed='PRODUCT_VERSION=\"V:\([0-9]*\).\([0-9]*\).\([0-9]*\).Build\([0-9]*\)\"'
var2=`grep -sn $rexpression_sed search-build.txt | sed -e 's/'$rexpression_sed'/\1\t\2\t\3\t\4/g'| cut -f 3`
echo $var2
Output
007

How to convert this to integer (7), add 1 to it (8) and again get back in the same form (008) in the easiest way? I will be using sed -i on the file, with this new string that can be used with RE for replacing that part!
Or
Is there any better method than above.

Thanks for any help.

Linker error when compiling on gcc with Makefile

Linker error when compiling on gcc with Makefile

Hi everyone,

I had problem with linker when i tried to compiled c file on gcc 3.4.6 with Makefile:(. Please help me to find a solution for this problem, i'm looking forward to your reply.
Attachment 3946

Thanks
Khoa Tran
Attached Images

Boot time kernel parameter config

Boot time kernel parameter config

Hi All,

How kernel parameter mem & memmap are related. If so how to interpret the values. Quick reponse to the post is higly appreciated.

Regards,
Athiraj Jegan

Support for Kenel memory allocation

Support for Kenel memory allocation

I'm facing problem in kernel memory allocation, that is when i'm trying to allocate 64MB contiguous memory in kernel using get_free_pages. The kernel fails to allocate the memory and kernel crash is happening. can anyone suggest me to rid of this problem ASAP.

linux postfix problem...

linux postfix problem...

hello all,
If i send mails using postfix,the mails stored in queue,not delivered to required recipient...can anyone please tell me the solution for this problem...

Question about building in linux & object files

Question about building in linux & object files

Hi!

I am a programmer that is new to the Linux environment, and I have a question regarding this.
Suppose I have a hello.c file, I know it's compiled by:

gcc -c hello.c

which in turn creates an object file "hello.o", and then when I do

gcc -o Hello hello.o

It creates a file without any extension, called "Hello". When I say "file Hello" and "file hello.o" to learn the file types, it says:

"Hello: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped"

and

"hello.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped"

Now, I thought that the "hello.o" object file was the ".exe" of Windows programs, that I could run it, but what is "Hello"?
Besides, when I say

gcc -o Hello hello.c directly without doing the compilation first, it doesnt give any "hello.o" file but directly a "Hello" executable. Why is this and what are the differences between "hello.o" and "Hello"?

Another question is what does "not stripped" mean?

Thanks!

Can