Thank you for your help guys, I have solved the issue but have a more interesting issue at hand.
The task is to create a c program that will check for a users input and then provide its length,the number of occurance of letters and the percentage of those letters.
E.g.
Input:
Hello Unix
Output:
Length of String: 9
Number of char h: 1
Number of char e: 1
Number of char l: 2
Number of char u: 1
Number of char n: 1
Number of char i: 1
Number of char x: 1
Percentage: of char h: 11.1%
etc
I have the following thus far:
The code seems to finish after the first go and does not give the user another chance.
I thought the do while loop meant that it would keep running the loop until the user says no
Probably should have started this in a new thread as it's a bit different than your original question.
Anyway -- Your expression in the while needs to test the value of something. For instance, *x == 'y'. I didn't look very closely, but I also notice that your scanf() function doesn't provide a variable for the response which will likely cause unpredictable results if not a core dump.
Is there a way to create a self extracting archive that works in both linux and windows? And if so how? Everything I have read on google only works in either Linux or Windows but not both. (6 Replies)
I have some variables containing for example
m02-npt02-sr40-syn-dv0p01-16x12drw
m02-npt02-sr40-syn-dv0p02-16x12drw
m02-npt02-sr40-dv0p03-syn-16x12drw
I want to extract the dv entry for example
dv0p01
dv0p02
dv0p03
Then I want to convert to a numeric, the p specifies the... (5 Replies)
Hi there,
I have one huge archive (it's a system image).
I need sometime to create smaller archives with only one or two file from my big archive.
So I'm looking for a command that extracts files from an archive and pipe them to another one.
I tried the following :
tar -xzOf oldarchive.tgz... (5 Replies)
Hi All,
I would like to extract specific file from a zip archive.
I have a zip archive "sample.zip".
sample.zip contains few text files and images... text1.txt, text2.txt, pic.jpg etc...
I need to read specific file "text2.txt" from "sample.zip" WITHOUT EXTRACTING the zip file.
... (4 Replies)
Dear all
I am in a problem. I have created a master server on which I have install a Solaris 10 OS as well as Oracle 10g with some additional solaris packages. Now I want to create a flash archive of this server and install that flash archive on another server, so that the new server will have... (6 Replies)
Can I extract files from an archive file (tar), where the filename includes the full directory path, to a different directory?
For example the archive files may have a filename of
/SrcFiles/XXX/filename.dat
and I want to extract it to /SrcFiles/YYY/filename.dat. Since the archive file was... (1 Reply)