Search Results

Search: Posts Made By: maverix
Forum: Open Source 02-22-2008
202,214
Posted By maverix
I voted for SuSe coz I am using it now. :)
I voted for SuSe coz I am using it now. :)
6,695
Posted By maverix
Did you check my earlier post?? The...
Did you check my earlier post??


The script I gave works fine for the type of file mentioned by you.
However, there's a catch in that script. If there's an empty line in the input file, a file...
6,695
Posted By maverix
check this out #!/bin/sh while read...
check this out


#!/bin/sh

while read myline
do
var=`echo ${myline} | cut -d'|' -f 1`;
echo ${myline} >> ${var}.txt;
done < ./input.txt


cheers
maverix
19,362
Posted By maverix
good that you found it useful!!! check out...
good that you found it useful!!!

check out the man pages for tail, awk and grep to understand how it works.
In particular, check the switches I've used for each command.

Don't think I am being...
19,362
Posted By maverix
Try this tail +`grep -in "Started" <logFile>...
Try this

tail +`grep -in "Started" <logFile> | tail -1 | awk -F: '{print $1}'` <logFile>

cheers
maverix
14,887
Posted By maverix
Hi All, Thank you for your inputs. As...
Hi All,

Thank you for your inputs.

As suggested by porter, I think I'll have to settle with file locking mechanisms as I am using a simple file.

Let me explore other IPC facilities (yet to...
14,887
Posted By maverix
Hi Jim and Neo, Thank you for your...
Hi Jim and Neo,

Thank you for your replies...

I am using RHEL 4.
I have used lockf() and flock() system calls and it seems to work fine.

However, I want to use semaphores to get the same...
14,887
Posted By maverix
semaphore concept
Hi All,

I am going through the semaphore concept and have a doubt regarding the same and hope to get a resolution here.

I have a file which has a number of records.
I want to write an...
Forum: Programming 08-15-2007
2,840
Posted By maverix
Hi porter, Thank you for your inputs. ...
Hi porter,

Thank you for your inputs.

It was a simple mistake from my side.
I had copied the functions and forgot to change the parameter in the open system call from O_RDONLY to O_RDWR.
...
Forum: Programming 08-14-2007
2,840
Posted By maverix
Can we use write() to modify/update intermediate records in a file
Hi,

I have a database (a simple .dat file) which has multiple records (structure datatype) in it.
I would like to know if we can use write() system call to update/modify intermediate records in...
19,991
Posted By maverix
Hello Shell Life and aigles, Thanks to both...
Hello Shell Life and aigles,

Thanks to both of you for your time.

mPrtList="$1 $2 $3"
egrep -i "$SEARCH_STR" ./datafile.dat | awk -F: "{ print $mPrtList }"

I had tried this earlier but this...
19,991
Posted By maverix
printing select fields in awk
Hi,

I want to print certain fields from my data file depending on certain conditions. Somebody pls let me know how to send it to awk.

The command below is the one which I want to use in a shell...
Showing results 1 to 12 of 12

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