General :: Count The Numerical Digits In Between The Text Using A Command Or A Script?
Jan 1, 2010
I want to count the digits in between the text in a file.
e.g.
write down the form
2.3 3.3 3.0 505.0 0.777E-07
22.3 3.3 5.0 503.0 1.777E-04
Then read this.
How can i do the counting of these digits present in between a text in a file?
View 9 Replies
ADVERTISEMENT
Apr 26, 2010
I have a file of words and want to encode them in a numeric form, based on position.This is best explained by example:
PEOPLE ==> 123152
Reading left to right:
P was first encountered at position 1 so it is encoded as 1.
E was first encountered at position 2 so it is encoded as 2.
[code]...
View 5 Replies
View Related
Apr 27, 2010
I want to (from the command line) be able to counte lines in a bunch of files of a specific type in a folder and all its sub-folders. How would I do this?
View 1 Replies
View Related
Jan 3, 2011
I just received a spreadsheet. Column B contains thousands of rows that look like this:
Giant Red Pencil 0.99
Case 2.99
Green Box 1.49
Ruler 0.59
Spiral Ring 0.10
So each cell contains the item and price. I need the corresponding cells in column C to contain only the price like this:
0.99
2.99
1.49
0.59
0.10
How do I extract just the price from column B and put it in column C ?
View 2 Replies
View Related
Sep 21, 2009
I have a utility that works with files. The utility is crashing at after about 120 files. The input to the utility is a file containing a filelist. I want to cut the file with the file names in it to seperate files containing about one hundred or so. My thought was to determine the number of lines/100 and then use head and delete to create temporary files to run the utility multiple times to prevent the crash. When I tried to create a variable using the wc -l command the output gives me the number of total lines but it also includes the filename of the input file. (873 Filename.txt) I can not figure out how to remove the Filename.txt from the variable.
View 2 Replies
View Related
May 3, 2010
I would like to count all the jpgs in my home folder I need a command like this:
~$ Sudo count -R /*/*.jpg
View 3 Replies
View Related
Mar 26, 2010
Anybody know and command to count any characters in file? I would like to know the total number of character " (quote) in file. My idea is to check if in a script the total number of this character is pair.
View 4 Replies
View Related
May 24, 2011
I'm trying to make and make install a driver for my wireless, every time, though, I use the make command, it'll start at 0 and cound almost up to 200,000 and then the computer freezes. I've tried different drivers, same result. I've tried ndiswrapper but that didn't work either.
View 8 Replies
View Related
Feb 27, 2010
I am a newbie in Linux. Here is my question....
Create the file ~/license_counts, which tables the number of occurrences of packages which are licensed under a given license, for the top 5 most commonly used licenses, sorted in numerically descending order. If performed correctly, your file should be formatted similarly to the following. (Do not be concerned if the actual counts or license names are different. Also, you might notice logically similar licenses, such as LGPL/GPL and GPL/LGPL. Do not make any attempt to combine them into a single entry.)
The resulted format:
I tried some method but cannot get it to work.
View 2 Replies
View Related
Oct 31, 2010
This has to also show the line count. I can get it to show the files but not the line count. What is the single command used to identify only the matching count of all lines within files under the /etc directory that contain the word „HOST? List only the files with matches and suppress any error messages.
View 4 Replies
View Related
Apr 9, 2010
I need to organise an external HDD such that there is no more than 500 folders on it.
Ubuntu's "Properties" pane shows only the file count, not the folder count.
Is there a simple CLI line that will tell me the number of subdirectories?
View 3 Replies
View Related
Feb 20, 2010
Write a script that will take a list of filenames as arguments and output a count of how many of them are regular files, and how many of them are scripts (if the file is executable, it will be assumed to be a script file)
Counts always come back as 0
View 5 Replies
View Related
Dec 17, 2010
I need to create a script to count the number of lines from a text file . The output must be put on another text file (no_lines.txt) and in this file i need to generate from the script this output :"File $FILE has $NO_LINES lines ".
View 3 Replies
View Related
Jul 13, 2011
I have a file like:
ER- V67
ER+ V68
ER- V69
ER+ V70
[Code]....
I am using the code:
sort -k1
but it prints it by sorting the second column.
View 8 Replies
View Related
Sep 11, 2009
I am trying to do a find/grep/wc command to find matching files, print the filename and then the word count of a specific pattern per file. Here is my best (non-working) attempt so far:
wc `find . ( -name "*.as" -o -name "*.mxml" ) -exec grep -H HeightResizableList {}` ;
View 10 Replies
View Related
Jun 20, 2011
I have many files with name in order of number. e.g)
u0101.asc
u0102.asc
u0103.asc
[code]...
I am trying to read file using for loop.
for ((date=01; date<=31; date++))
do
echo ${date}
done
but '01' is read(print) as '1' How can I make it read from '1' to '01'?
View 6 Replies
View Related
Mar 22, 2010
I have this .txt file
3183630 R
3574216 W
5264994 M
2656889 A
I want to sort it by the numerical order of column. After sort, I wish to get output like
2656889 A
3183630 R
3574216 W
5264994 M
anyone knows how to use sort to do that? or any other command?
View 6 Replies
View Related
Jun 19, 2010
I am using some "Numerical Recipes in C" routines in my C code.(I am using ludcmp() & lubksb().)These are used to find inverse of a matrix.After compiling my c code, I get following warning messages.I have not understood them at all. What is the meaning of these and why did they pop up and how to remove them?
Code:
nrutil.h:11: warning: 'sqrarg' defined but not used
nrutil.h:14: warning: 'dsqrarg' defined but not used
[code]....
View 7 Replies
View Related
Jul 16, 2010
Is there a command to count inodes with in a directory?
I know I can see total inode usage with:
df -i
And I know I can find total number of files with:
find ./ |wc -l
But how can I find inodes? As files over 8kb (if using the default partitioning of 1 node over 2 4kb blocks) would take up more than 1 inode.
View 2 Replies
View Related
Feb 24, 2010
I have the following perl/DBI script:
Quote:
#!/usr/bin/perl
use DBI;
my ($db, $user, $pw) = ('dbname', '****', '***********');
my $dbh = DBI->connect("DBI:mysql:$db",$user,$pw) or die "Cannot connect to $db: $DBI::errstr
[code].....
The error message is
[Wed Feb 24 13:03:27 2010] myscript.cgi: DBD::mysql::st execute failed: Column count doesn't match value count at row 1 at myscript.cgi. [Wed Feb 24 13:03:27 2010] myscript.cgi: DBI::db=HASH(0x8a30c60)->errstr
View 2 Replies
View Related
Oct 11, 2010
I have a String like "A.words=Ajay,Anil" in file A.And it contains a lot of other information also. I wanted to replace "Ajay,Anil" with "Vijay,Vinay" with sed command with using existing file only(not using another file)
View 9 Replies
View Related
May 2, 2010
I have huge text files with two fields, the first is a string the second is an integer. The files are sorted by the first field. What I'd like to get in the output is one line per unique string and the sum of the numbers for the identical strings. Some strings appear only once while other appear multiple times. Given the sample data below, for the string glehnia I'd like to get 10+22=32 in the result. how to do this either with gnuwin32 command line tools or in linux shell?
[Code]...
View 2 Replies
View Related
Oct 24, 2010
I want a command line tool that echoes a string in ASCII art way, like here.
View 2 Replies
View Related
Oct 4, 2010
I want to insert the text "DB dept" in the last line of passwd file which looks like this right now
Quote:
newuser:x:717:717::/home/sacharje:/bin/bash
And I want it to be like this:
Quote:
newuser:x:717:717: DB dept:/home/sacharje:/bin/bash
I tried to do that with sed but failed, I'd like to know the proper syntex with sed to achieve this.
View 7 Replies
View Related
Apr 1, 2011
my webpage PHP below. I would like to enter "Hello, in the main inputbox field" below (You are editing: textfile.txt) and click "SAVE" directly from command line.
Sort of : wput_php "hello, in the main inputbox field" click save, and here is it. the text would be uploaded.
PHP Code:
[Code]....
View 2 Replies
View Related
Feb 11, 2011
I have an SQL dump, file.sql that has many references to a particular domain, d1.com. I would like to run a command that can replace every occurrence of d1.com with d2.com. I've tried looking into sed before but the man pages are quite daunting.
View 14 Replies
View Related
Jan 28, 2010
I need to be able to edit a file from the commend line as I intend to script this operation, the file is called menu.lst The original is as below
Code:
titleUbuntu 8.04.3 LTS, kernel 2.6.24-24-generic
root(hd0,0)
kernel/boot/vmlinuz-2.6.24-24-generic root=UUID=b09feb23-5524-4ec4-862f-94700b968f64 ro quiet splash
[code]....
View 4 Replies
View Related
May 14, 2010
What is the command to sort a text file by the second word?
View 4 Replies
View Related
Mar 14, 2011
Does anyone know of a commercial program that will run on openSUSE?I need something that is fairly user friendly, identifies individual voices, and does not require Wine. The machine is to be completely controlled by voice and would be programmed to issue vocals in response to vocal requests for what is in the various databases and I/O software, such as motion control and other sensor subsystems. In other words, a program that lends itself to AI robotics.I do not have the time to develop CMSphinx, and I am willing to pay. I have been on a few sites but they are cryptic as far as the technicals, which I do not fully understand anyway.
View 1 Replies
View Related
Dec 2, 2010
First I hope to undrestand my English word because Iam Arabic girl and not so good in English...
my problem is:
I wrote code in .c file and I run that code on the prompt command, its ture but I want after the out put copy the code on the command by some statment in the code , how can I do that?
View 3 Replies
View Related