3. The attempts at a solution (include all code and scripts):
This is my program,what I want is do this program to check how many bytes,lines and words inside any of the file.
When I type wc test.cpp it will pop out
6 111 12608 test
But when I type wc test.cpp | ./test -l
it give me segmentation fault(core dumped)
Anyone can help me with this?
The entire template must be completed; not just the 1st three questions!
The answer to question #1 in the template should be a clear statement of what your assignment is. What is your program supposed to do? Is it really supposed to be processing the output from a wc command, or are you supposed to be implementing a replacement for the wc utility?
Where is your program dropping core? What output do you get from you debugger when you give it your core file?
Please use CODE tags for all sample input, output, and code segments; not just your C++ code.
This thread is closed. Please open a new thread with the complete template fully filled in.
I have a make file for C program, which always gives the error
ld: 0711-738 ERROR: Input file ../src/file_name.o
XCOFF32 object files are not allowed in 64 mode
Does anybody know the problem?
Thanks for contribution (2 Replies)
have been trying for a few weeks not to get this program running. I am newer to programming and it has definitely been a challenge. I think my problem arises with my if statement. I can get it to append the name to the new file, but it simply appends the whole sequence to the file rather than... (3 Replies)
I have a bash script that launches another problem. I need to run that program under a certain user account. The script itself is run using 'sudo <scriptname>'.
#!/bin/bash
myprogram=...
exec "$myprogram"
How would this be done? (1 Reply)
Hey, im editing the passwd file so that when the user ben logs in it runs my assign program.
I changed the last column from
to
Then when i log in i get...
There is no problem with the program because it runs fine when i open it normally.
Any help much appreciated. (8 Replies)
Which log file lists the activity of startup scripts, particularly loginhooks? I am trying hard to find it and I cannot. How can I even tell if my script is running without errors if there isnt a log? Very frusturating! (1 Reply)
I scheduled a cron job to run @ 1:00 as follows ,
00 01 * * * /app/cbf/CLIF/version-1.0.0.0/scripts/archival.sh
Please find the archival.sh script.
But cron is throwing a mail stating sqlplus command not found
So can anybody suggest what might be the problem ??? (13 Replies)
Hi,
I have a program in /opt/local/bin, my path in my .profile is
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
however when i type the program name it cannot find it, however i know the program is in /opt/local/bin?
Thanks (2 Replies)
Im new and wanted to know if im in the unix terminal and lets say i want to run microsoft word for example. i go in and go into the HD and then keep going and i type ls and see that microsoft word.app is there. how do i run it from that? (4 Replies)
Please help, I have tried to run this program countless times and still nothing. Please tell me what I'm doing wrong.
$ cat>test
count=1
while
do
echo "5"
read number
echo $5
let count=count+ 1
done
exit 0
^C$ ksh test
$ ^C
$ ksh test
$
$ nothing happend (6 Replies)
Can someone help me debug a c program I am running? It gives me segmentation fault.
I want to turn on debugging. Can some one give the command to turn it on?
Below is the error I get:
Segmentation Fault (core dumped) (3 Replies)