Search Results

Search: Posts Made By: sathishkmrv
12,006
Posted By sathishkmrv
Modifying a file without changing inode number
Thank you very much.
This resolves my issue.
12,006
Posted By sathishkmrv
Modifying a file without changing inode number
Hi all,
I am struggling to change the content of a file without changing the inode number. The exact issue is as below.

I have a file name test.bak which has 100 lines of text.
I am trying to...
Forum: Programming 10-04-2008
10,246
Posted By sathishkmrv
How to use strtok twice in the same program?
Yes. It worked!!!
But how did the insertion of str2.insert(0, ""); solved the problem?
The manpages also suggests that it is not advisable to use.
Forum: Programming 10-04-2008
10,246
Posted By sathishkmrv
How to use strtok twice in the same program?
string str1(" 1 2 3 4 512543 ");
string str2;
if(str2.empty())
str2=str1;
cout << "str2:" <<str2 <<endl;
...
37,275
Posted By sathishkmrv
Got one more problem.:o I was trying to process...
Got one more problem.:o
I was trying to process on each line of the output from variable A.
I want to get the PID's listed in the ptree output.
But not able to do that because when I process on...
37,275
Posted By sathishkmrv
Thanks a lot!!:cool: I too got it!!! :p ...
Thanks a lot!!:cool:
I too got it!!! :p


#>A=`ptree 23404`
17307 test -a test1
17308 test1 -a test
17319 test1 -a port4
17369 test -a port3
17417 test -a port
17309 test1...
37,275
Posted By sathishkmrv
c=1;while IFS= read;do printf "Line $((c++)) is:...
c=1;while IFS= read;do printf "Line $((c++)) is: %s\n" "$REPLY";done< <(echo "$A")

I guess the above code is for csh.

I am using ksh. Sorry for not being clear earlier :o.

Also, I knew the...
37,275
Posted By sathishkmrv
Read line by line from a variable.
Hi,
I have a variable which contains the output of a command(which has more lines).
Now I want to read line by line from the variable.

for example.
#>A=`ptree 23404`
17307 test -a test1
...
Showing results 1 to 8 of 8

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