I am finishing an intro to C programming, the next to last chapter is giving me a problem here is my code:
I have also tried, ~/Five , and ../..Five . The file is located on my hard drive. What is wrong?
Last edited by Scott; 11-07-2010 at 07:19 AM..
Reason: Please use code tags
Not sure what your problem is. I cut/pasted your code and it works without a problem. Are you sure that the file Five is in the parent directory when you execute the binary?
It can also be helpful to print the error associated with the failure if the file cannot be opened:
it posts the same error, "error opening ../mydatafile" i am using xcode for mac i do not know too much about commands to call the files, the file titled "five" is a .rtf file. "../" should call the hard disk right?
The notation ../ indicates that the file is in the parent directory, rather than the current (or present) working directory.
Assuming you are running this from the command line (terminal), then you can test for the presence of the file with this command line command:
If that results in a file not found message, try removing the ../ to see if it is in the current directory. If it is, then remove those from your string in the C programme.
Hi 2 all,
i have had AIX 7.2
:/# /usr/IBMAHS/bin/apachectl -v
Server version: Apache/2.4.12 (Unix)
Server built: May 25 2015 04:58:27
:/#:/# /usr/IBMAHS/bin/apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_worker_module (static)
... (3 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Hi all.
I have a .txt file that I need to sort it
My file is like:
1- 88 chain0 MASTER (FF-TE) FFFF 1962510 /TCK T FD2TQHVTT1 /jtagc/jtag_instreg/updateinstr_reg_1 dff1 (TI,SO)
2- ... (10 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
I tried opening .bash_profile using the following command:
$ open .bash_profile
Some people use the following form:
$ open -e .bash_profile
What is the difference between the two although I find the output is the same?
Thanks. (2 Replies)
Hi,
I've modified the syslogd source to include a thread that will keep track of a timer(or a timer thread). My intention is to check the file size of /var/log/messages in every one minute & if the size is more than 128KB, do a echo " " > /var/log/messages, so that the file size will be set... (7 Replies)
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)