hey guys.
im currently trying to make a program in unix (redhat, compiling the .c file using gcc) and i need urgent urgent help.
i need to save objects of structures in a file but they dont seem to be saving properly. ive been on it for a whole day now. dunno why i cant do it.
when i try to read, it reads the first search i give it but after that i start getting garbage
here is the structure(names of variables omitted)
the rest of the relevant code to add is here,
here is the code to read the file
please help me out
Last edited by pludi; 04-08-2010 at 01:52 AM..
Reason: code tags, please...
i would like advice on the usbject of c programming (in the middle of reading a book on C). could i benefit more if i apply that knowledge in the unix format if i were able to, or would that take the point out of learning C, basically I want to stay away from strying too far away from unix and use... (1 Reply)
hi guys,
I m from india. I m working as programmer in one of MNC. Since 3 years im working on Microsoft platform on dot net and platforms.
but now i decided to shift my future to unix , Linux side. I want to be the part of this open source family.
and with this i want to make my future also.... (3 Replies)
hi guys,
I m from india. I m working as programmer in one of MNC. Since 3 years im working on Microsoft platform on dot net and platforms.
but now i decided to shift my future to unix , Linux side. I want to be the part of this open source family.
and with this i want to make my future also.... (6 Replies)
Several months ago I found a link that explained the difference between how a Unix Systems Admin would do scripting compared to what a Unix Programmer would do.
It showed a basic script and then show several iterations that explained how the Systems Admin would change it to make it better. I was... (0 Replies)
Hello,
I am trying to learn Networking Programming in C in unix enviorment. I want to know how good it is to become a network programmer. i am crazy about Network programming but i also want to opt for the best carreer options. Anybody experienced Network Programmer, please tell me is my... (5 Replies)
I asked this over on the "High Level Programming Section" but there must be a secret handshake or something that I am missing.....anyway....if a person wanted to start some C programming in UNIX what would be the best compiler to start with ??
I am fairly familiar with visual studio and have done... (2 Replies)
hey guys im trying to create a batch file that makes directories
i have this code atm
#!/bin/sh
echo "Please enter file name:"
read Filename
echo "enter number of files to be created "
read created
for (( i = 1; i < &created; 1++ ))
do
mkdir $Filename$i
done
assume i enter... (7 Replies)
How does unix system administration, unix programming, unix network programming differ?
Please help. (0 Replies)
Discussion started by: thulasidharan2k
0 Replies
LEARN ABOUT CENTOS
file::spec::win32
File::Spec::Win32(3) User Contributed Perl Documentation File::Spec::Win32(3)NAME
File::Spec::Win32 - methods for Win32 file specs
SYNOPSIS
require File::Spec::Win32; # Done internally by File::Spec if needed
DESCRIPTION
See File::Spec::Unix for a documentation of the methods provided there. This package overrides the implementation of these methods, not the
semantics.
devnull
Returns a string representation of the null device.
tmpdir
Returns a string representation of the first existing directory from the following list:
$ENV{TMPDIR}
$ENV{TEMP}
$ENV{TMP}
SYS:/temp
C:system emp
C:/temp
/tmp
/
The SYS:/temp is preferred in Novell NetWare and the C:system emp for Symbian (the File::Spec::Win32 is used also for those
platforms).
Since Perl 5.8.0, if running under taint mode, and if the environment variables are tainted, they are not used.
case_tolerant
MSWin32 case-tolerance depends on GetVolumeInformation() $ouFsFlags == FS_CASE_SENSITIVE, indicating the case significance when
comparing file specifications. Since XP FS_CASE_SENSITIVE is effectively disabled for the NT subsubsystem. See
http://cygwin.com/ml/cygwin/2007-07/msg00891.html Default: 1
file_name_is_absolute
As of right now, this returns 2 if the path is absolute with a volume, 1 if it's absolute with no volume, 0 otherwise.
catfile
Concatenate one or more directory names and a filename to form a complete path ending with a filename
canonpath
No physical check on the filesystem, but a logical cleanup of a path. On UNIX eliminated successive slashes and successive "/.". On
Win32 makes
dir1dir2dir3....dir4 -> dirdir4 and even
dir1dir2dir3...dir4 -> dirdir4
splitpath
($volume,$directories,$file) = File::Spec->splitpath( $path );
($volume,$directories,$file) = File::Spec->splitpath( $path,
$no_file );
Splits a path into volume, directory, and filename portions. Assumes that the last file is a path unless the path ends in '\', '\.',
'\..' or $no_file is true. On Win32 this means that $no_file true makes this return ( $volume, $path, '' ).
Separators accepted are and /.
Volumes can be drive letters or UNC sharenames (\servershare).
The results can be passed to "catpath" to get back a path equivalent to (usually identical to) the original path.
splitdir
The opposite of catdir().
@dirs = File::Spec->splitdir( $directories );
$directories must be only the directory portion of the path on systems that have the concept of a volume or that have path syntax that
differentiates files from directories.
Unlike just splitting the directories on the separator, leading empty and trailing directory entries can be returned, because these are
significant on some OSs. So,
File::Spec->splitdir( "/a/b/c" );
Yields:
( '', 'a', 'b', '', 'c', '' )
catpath
Takes volume, directory and file portions and returns an entire path. Under Unix, $volume is ignored, and this is just like catfile().
On other OSs, the $volume become significant.
Note For File::Spec::Win32 Maintainers
Novell NetWare inherits its File::Spec behaviour from File::Spec::Win32.
COPYRIGHT
Copyright (c) 2004,2007 by the Perl 5 Porters. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
See File::Spec and File::Spec::Unix. This package overrides the implementation of these methods, not the semantics.
perl v5.16.3 2013-01-16 File::Spec::Win32(3)