Search Results

Search: Posts Made By: laopi
Forum: Programming 10-28-2011
3,846
Posted By laopi
fgets read file line with "\n" inside
Hi,

I have a string like this,

char str[] ="This, a sample string.\\nThis is the second line, \\n (file://\\n) \\n (file://\\n), we will have one blank line";

if I want to use strtok() to...
3,904
Posted By laopi
works like a charm
works like a charm
3,904
Posted By laopi
use vimdiff inside while read
Hi,

I need to read a file name from a txt file, found the difference in two folders, then modify the file using vimdiff,

while read file
do
diff src/$file dest/$file > /dev/null 2>&1
if...
1,132
Posted By laopi
makefile sourc and dest are in different directory
Hi,
in makefile, if the sourc and dest in different directory, no matter the source file changed or not, it seems the dest always been build, how do you resolve this?
Thanks.
peter
Forum: Programming 04-22-2011
5,060
Posted By laopi
table is a database table
Tell us more about this table. Is it a file? A data structure?
Forum: Programming 04-21-2011
5,060
Posted By laopi
I should make it more clear, sorry about it.
header file,
#define MIN_NUM 10
#define MAX_NUM 30

I had a table

tag,authLevel
MIN_NUM, 3
MAX_NUM, 5

a function
checkAuthLevel(int) {

}

-----------------

in function...
Forum: Programming 04-21-2011
5,060
Posted By laopi
#define in c
Hi,

I had a head file, looks like
#define MIN_NUM 10
#define MAX_NUM 10

is there any way to get "MAX_NUM" from 10?

thanks.

peter
2,403
Posted By laopi
thanks, it works. peter
thanks, it works.

peter
2,403
Posted By laopi
make -j dependency
Hi,

I had a make file, something like that,

all:
cd dir1; make
cd dir2; make

the problem is the makefile under dir2 need some objs from dir1, so I need to set some dependency...
1,422
Posted By laopi
specific number jobs run at the same time
Hi,

I have more that 100 jobs I can run background, if I want only 4 running at ther same time, how can I write a script to control it?

Thanks

peter
Forum: Solaris 12-18-2009
3,749
Posted By laopi
install eclipse under solaris without root password?
hi,

Ho can I install eclipse under solaris without root password?

Thanks.

peter
1,989
Posted By laopi
thanks, it works.
When you execute the script, try using this syntax to make the environment variable which you set in the script stay in the environment.

. ./scriptname

(Dot space dot slash scriptname).
1,989
Posted By laopi
run a script to set a globle varible?
Hi,

My original shell is csh, I don't likw it, so I have to run bash every time after I login, the problem is I have a script like

export PLOG=$1,

every time I run the script under bash,...
Showing results 1 to 13 of 13

 
All times are GMT -4. The time now is 02:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy