10 More Discussions You Might Find Interesting
1. Programming
Hello,
I have a programming assignment to count number of occurrences of hours in particular file. Below is the code:
fname = raw_input("Enter file name: ")
if len(fname) < 1 : fname = "mbox-short.txt"
largest = None
fh = open(fname)
counts = dict()
test = list()
for line in fh:
... (2 Replies)
Discussion started by: infinitydon
2 Replies
2. Shell Programming and Scripting
There is a closed thread called "carriage returns within quotation marks causing new lines in csv" that I am unable to post to, so I am starting a new thread.
The awk solution worked perfectly in most cases. We have some cases where there are multiple carriage returns within a single quoted... (9 Replies)
Discussion started by: Mary Roberts
9 Replies
3. Shell Programming and Scripting
I have a csv file with 3 columns. Fields are comma delimited and strings are enclosed with quotation marks "". About 40% of the time, the line of values will start a new line thanks to carriage return characters within a string.
Example:
"apple","banana","orange"
"pineapple","grape","straw... (6 Replies)
Discussion started by: koeji
6 Replies
4. Shell Programming and Scripting
I'm working on AIX 6, ksh shell. The parameters are some strings quotated by double quotation marks which from a file. They are quotated because there may be spaces in them.
Example:
"015607" "10" " " "A"I want to pass these parameters to a shell function by writing the following command:
... (4 Replies)
Discussion started by: Shimmey
4 Replies
5. Shell Programming and Scripting
Hello,
I have a text file with n lines in the following format (9 column fields):
Example:
contig00012 149606 G C 49 68 60 18 c$cccccacccccccccc^c
I need to count the number of lower-case and upper-case occurences in column 9, respectively, of the... (3 Replies)
Discussion started by: s052866
3 Replies
6. UNIX for Dummies Questions & Answers
Suppose i have data like :-
1,2,3,4,5
a,b,c
x,y,z,t
I want to count the occurence of , (comma) in every line.
Waiting for a solution. (5 Replies)
Discussion started by: sumit207
5 Replies
7. UNIX for Advanced & Expert Users
Suppose i have data like :-
1,2,3,4,5
a,b,c
x,y,z,t
I want to count the occurence of , (comma) in every line.
Waiting for a solution.:) (1 Reply)
Discussion started by: sumit207
1 Replies
8. Shell Programming and Scripting
I want to count the number of occurence of perticular word from one text file.
Please tell me "less" command is work in ksh or not. If it is not working then instead of that which command will work. :confused: (40 Replies)
Discussion started by: rinku
40 Replies
9. Shell Programming and Scripting
i have a file like this
aaaa bbbb cccc
aaa aaaa
aa cccccccccccccccc
aaaaaaa aaaa aaaa
i want to enclose this lines with double quotation:
"aaaa bbbb cccc"
"aaa aaaa"
"aa cccccccccccccccc"
"aaaaaaa aaaa aaaa"
any idea? (preferably without using sed)
thanks in advance... (3 Replies)
Discussion started by: gfhgfnhhn
3 Replies
10. Shell Programming and Scripting
i want to count the number of character contained in afile using perl cript help me out (1 Reply)
Discussion started by: trupti_rinku
1 Replies