03-19-2007
How to write a code in C to search a file
Dear All,
Plz give me some code that how can I search a file through a C program file may be in Present Directory or in its Sub-Directories and it should support Linux Platform.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
i="1"
while
do
k=`expr $i + 1`
sed -e 's/"$i"/"$k"/' < somefile1.txt >> somefile2.txt
i=`expr $i + 1`
done
ive been trying to :
1 from a file containing numbers in a row divided with correct number of 2 spaces to find the corresponding one
2 change the value
3 and append... (1 Reply)
Discussion started by: trilicno
1 Replies
2. UNIX for Dummies Questions & Answers
i="1"
while
do
k=`expr $i + 1`
sed -e 's/"$i"/"$k"/' < somefile1.txt >> somefile2.txt
i=`expr $i + 1`
done
ive been trying to :
1 from a file containing numbers in a row divided with correct number of spaces to find the corresponding one
2 change the value
3 and append... (3 Replies)
Discussion started by: trilicno
3 Replies
3. Programming
Hi everybody, i am doing a project on checkpoints, where in i need to write the heap area into a file. I have got a code which i need to analyze, also asked in the forum under solaris
https://www.unix.com/solaris/135483-libckpt.html
The heap is implemented as a link list given by the structure... (2 Replies)
Discussion started by: holla4ni
2 Replies
4. Shell Programming and Scripting
hi ..
i have a problem how to search file with date and version number(ms_2.0_dd/mm/yy_24)in folder.Here 24 is version number and compare the this file to other file which is in another folder and if does not match then copy this file to respective folder.Also copy different files in different... (1 Reply)
Discussion started by: shubhig15
1 Replies
5. Shell Programming and Scripting
hi buddies;
rollbackip.txt:10.14.3.65 2
10.14.3.65 3
...
lookup.txt:
...
10.14.3.65 2 10.14.5.55 1 55 10.14.6.66 1 66
10.14.3.65 3 10.14.7.77 3 77 10.14.8.88 2 88 10.14.9.99 4 99
...
ip-port.txt
...
port111 3 10.14.5.55 57
port111 2 10.14.5.55 51
port111 1 10.14.5.55 59 ->... (7 Replies)
Discussion started by: gc_sw
7 Replies
6. Shell Programming and Scripting
Guys, i wanna get any user files with write permission (on user or group permission) for review but i confuse with -perm parameter.
any body can help me to explain what is that mean?
thank's (1 Reply)
Discussion started by: michlix
1 Replies
7. Shell Programming and Scripting
Hi , Need to shell script to extracts files names and write those to another file in different directory.
input file is
inputfile.txt
abc|1|bcd.dat
123 david123
123 rudy2345
124 tinku5634
abc|1|def.dat
123 jevid123
123 qwer2345
124 ghjlk5634
abc|1|pqr.txt
123 vbjnnjh435
123 jggdy876... (1 Reply)
Discussion started by: dssyadav
1 Replies
8. Shell Programming and Scripting
I have file which contains a huge amount of data. I need to search the pattern Message id. When that pattern is matched I need to get abcdeff0-1g6g-91g3-1z2z-2mm605m90000 to another file.
Kindly provide your input.
File is like below
Jan 11 04:05:10 linux100 |NOTICE... (2 Replies)
Discussion started by: Raysf
2 Replies
9. Shell Programming and Scripting
Hi,
I have a file which contains the below details.. My requirement is to fetch all the lines which are starting with "ABC_XY_" into 1 file and rest of the lines (not starting with "ABC_XY_") into another file.
Could you please help with what command needs to be used?
file1.txt
----------... (12 Replies)
Discussion started by: satyaatcgi
12 Replies
10. Shell Programming and Scripting
Hi Friends,
I have a very big text file, that has code for multiple functions. I have scan through the file and write each function in seperate file. All functions starts with
BEGIN DSFNC
Identifier "ABCDDataValidationfnc"
and ends with
END DSFNC
I need create a file(using identifier)... (2 Replies)
Discussion started by: anandapani
2 Replies
LEARN ABOUT DEBIAN
module::build::platform::macos
Module::Build::Platform::MacOS(3pm) User Contributed Perl Documentation Module::Build::Platform::MacOS(3pm)
NAME
Module::Build::Platform::MacOS - Builder class for MacOS platforms
DESCRIPTION
The sole purpose of this module is to inherit from "Module::Build::Base" and override a few methods. Please see Module::Build for the
docs.
Overridden Methods
new()
MacPerl doesn't define $Config{sitelib} or $Config{sitearch} for some reason, but $Config{installsitelib} and $Config{installsitearch}
are there. So we copy the install variables to the other location
make_executable()
On MacOS we set the file type and creator to MacPerl so it will run with a double-click.
dispatch()
Because there's no easy way to say "./Build test" on MacOS, if dispatch is called with no arguments and no @ARGV a dialog box will pop
up asking what action to take and any extra arguments.
Default action is "test".
ACTION_realclean()
Need to unlock the Build program before deleting.
AUTHOR
Michael G Schwern <schwern@pobox.com>
SEE ALSO
perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
perl v5.14.2 2012-06-27 Module::Build::Platform::MacOS(3pm)