Write a program which asks user to enter a string and that string saves in a .txt file. After the file has been saved your program must count how many time letter 'a' has been reapeated ?
Use fstream, string, and cctype libraries to make your jobe easier.
I wrote following code
I googled and also asked my friends but nobody can find an error
Hi,
I want to be able to list all the names in a file which begin with a capital letter, but I don't want it to list words that begin a new sentence. Is there any way round this?
Thanks for your help. (1 Reply)
Hi
I am running a shell script with bdf command and want to match all files with length 3 inside a specific partitions. How do i do that
say
for example if i want to list all files with length 3 in /home/jimmy partition,
bdf /home/jimmy
the output i need is
xyx
abc
yyy
amp
... (4 Replies)
How to check whether a particular string contains dot or not?
Here I can not use grep as the string is not in a file. I will get this string from user input
Thanks, (2 Replies)
Hi im a noob in Unix
Do you guys know what command display you the files that have the character n in there name im not looking that they have the n in the beginning or in the end im looking that in search the entire string to see if it have the character n i try this
ls n*
but only show... (2 Replies)
Hi,
I have lets say 10 files , I need to process them one by one.
So I need a command to get one file name at a time to process it into a variable
Example
Files
P1111.dat
P3344.dat
S344.dat
...
v_file_name = 'p111.dat' .. I will rename it to something after processing
... (1 Reply)
i would like to search for a letter in a string and get its index position.
example:
name='john'
pos=$(expr index $name o)
the result will be equal to 2 (2nd position)
how do you make this thing not case sensitive?
example:
name='john'
pos=$(expr index $name O)
the... (1 Reply)
I do have a large tab delimited file with the following format
CCCCCGCCCCCCCCCCcCCCCCCCCCCCCCCCC 23 65 3 4
AAAAAAAAAAAAAAAAaAAAAAAAAAAAAAAAA 24 6 89 90
TGTTTTTTTTTTTTGGtTTTTTTTTTTTTTTTT 2 4 8 90
TTTT-TTTTTTTTTTTtTTTTTTTTTTTTTTTT 1 34 89 50
GGGGGGGGGGGGGGGGTGGGGGGGGGGGGGGGG 87 6 78 66... (8 Replies)
I am trying to remove the last letter in a file and then multiply each line (which contained this letter) by 500. This is what I have:
1499998A
1222222A
1325804A
1254556
1235
9998
777
cat /tmp/listzz |gawk '{print $4}'|gawk '{gsub(//, ""); print } This removes the A... (1 Reply)
Good afternoon all,
I want to ask how to change some letter in my file with other letter in spesific line
eg.
data.txt
1
1
1
0
0
0
0
for example i want to change the 4th line with character 1.
How could I do it by SED or AWK.
I have tried to run this code but actually did not... (3 Replies)
Discussion started by: weslyarfan
3 Replies
LEARN ABOUT DEBIAN
tempstream
FBB::TempStream(3bobcat) Temporary fstream FBB::TempStream(3bobcat)NAME
FBB::TempStream - Temporary fstream
SYNOPSIS
#include <bobcat/tempstream>
DESCRIPTION
FBB::TempStream objects are temporary std::fstreams opened with mode 0600 (user only read+write). The file created by a TempStream object
is removed from the file system once the TempStream object goes out of scope.
A TempStream object creates an empty file, and information can immediately be inserted into the TempStream object. To switch between inser-
tion and extraction simply call seekg (for extraction) or seekp (for insertion).
NAMESPACE
FBB
All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB.
INHERITS FROM
std::fstream
CONSTRUCTORS
o TempStream(std::string const &base = "/tmp/FBB::TempStream"):
The constructor initializes the object and creates a file with the given base-name to which six random characters are appended. If
the TempStream could not be constructed an FBB::Errno exception is thrown. The copy constructor is not available.
MEMBER FUNCTIONS
All std::fstream members are available, as FBB::TempStream inherits from this class. In addition, TempStream itself offers
o std::string const &fileName() const:
The name of the created temporary file.
EXAMPLE
#include <iostream>
#include <bobcat/tempstream>
using namespace std;
using namespace FBB;
int main()
{
TempStream ts("/tmp/demo");
ts << "Hello world
";
ts.seekg(0);
string line;
getline(ts, line);
cout << line << ", removed: " << ts.fileName() << '
';
}
FILES
bobcat/tempstream - defines the class interface
SEE ALSO bobcat(7), mkostemp(3)BUGS
None reported.
DISTRIBUTION FILES
o bobcat_3.01.00-x.dsc: detached signature;
o bobcat_3.01.00-x.tar.gz: source archive;
o bobcat_3.01.00-x_i386.changes: change log;
o libbobcat1_3.01.00-x_*.deb: debian package holding the libraries;
o libbobcat1-dev_3.01.00-x_*.deb: debian package holding the libraries, headers and manual pages;
o http://sourceforge.net/projects/bobcat: public archive location;
BOBCAT
Bobcat is an acronym of `Brokken's Own Base Classes And Templates'.
COPYRIGHT
This is free software, distributed under the terms of the GNU General Public License (GPL).
AUTHOR
Frank B. Brokken (f.b.brokken@rug.nl).
libbobcat1-dev_3.01.00-x.tar.gz 2005-2012 FBB::TempStream(3bobcat)