11-20-2012
Can't figure out how to find specific characters in specific columns
I am trying to find a specific set of characters in a long file. I only want to find the characters in column 265 for 4 bytes.
Is there a search for that? I tried cut but couldn't get it to work.
Ex. I want to find '9999' in column 265 for 4 bytes. If it is in there, I want it to print out the whole line.
Thanks for any advice.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I cannot figure this one out. I would like to do the following. I have a line that has 7 words. It is possible that the line can have 20 words too. I always want to show the 9th word and beyond. The 9th word will always change so I do not have something to search for, so I think... (1 Reply)
Discussion started by: ctcuser
1 Replies
2. Shell Programming and Scripting
i'm trying to get the user to enter a character, then the script should search for how many of that character exists in the file. I have the following code, but it doesn't work properly and it shows the wrong amount (i don't think im supposed to use grep). For example, I want it to say, "There are... (7 Replies)
Discussion started by: kev269
7 Replies
3. Shell Programming and Scripting
Hi,
I have following samp.txt file in unix.
samp.txt
01Roy2D3M000000
02Rad2D3M222222
.
.
.
.
10Mik0A2M343443
Desired Output
01Roy2A3M000000
02Rad2A3M222222
.
. (5 Replies)
Discussion started by: techmoris
5 Replies
4. Shell Programming and Scripting
sed -e "s// /g" old.txt > new.txt
While I do know some control characters need to be escaped, can normal characters also be escaped and still work the same way? Basically I do not know all control characters that have a special meaning, for example, ?, ., % have a meaning and have to be escaped... (11 Replies)
Discussion started by: ijustneeda
11 Replies
5. Shell Programming and Scripting
Hi all, I need help.
I have an input text file (input.txt) like this:
21 GTGCAACACCGTCTTGAGAGG 50
21 GACCGAGACAGAATGAAAATC 73
21 CGGGTCTGTAGTAGCAAACGC 108
21 CGAAAAATGAACCCCTTTATC 220
21 CGTGATCCTGTTGAAGGGTCG 259
Now I need to count A/T/G/C numbers at each character location in column... (2 Replies)
Discussion started by: thienxho
2 Replies
6. Shell Programming and Scripting
I have a file like:
s_20331 803 1 1 5 1:2=0.00000000 1:3=0.00000000 1:4=0.11111111
s_20331 814 1 1 5 1:2=0.00000000 1:3=0.12611607 1:4=0.00000000I would like to remove the four characters "x:x=" from all columns containing them (in my actual file, there are 15 total columns (i.e. columns... (1 Reply)
Discussion started by: pathunkathunk
1 Replies
7. UNIX for Dummies Questions & Answers
Hi
I have a file which is tab-delimited. Now, I'd like to print the lines which have "chr6" string in both first and second columns. Could anybody help? (3 Replies)
Discussion started by: a_bahreini
3 Replies
8. Shell Programming and Scripting
Need command for position based replace:
I need a command to replace with 0 for characters in the positions 11 to 20 to all the lines starts with 6 in a file.
For example the file ABC.txt has:
abcdefghijklmnopqrstuvwxyz
6abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz... (4 Replies)
Discussion started by: thangabalu
4 Replies
9. UNIX for Beginners Questions & Answers
Hi ,
I have a requirement to read a file ( 5 fields , ~ delimited) and find the records which contain anything other than Alphabets, Numbers , comma ,space and dot . ie a-z and A-Z and 0-9 and . and " " and , in 2nd field. Once I do that i would want the result to have field1|<flag>
flag can... (2 Replies)
Discussion started by: ashwin3086
2 Replies
10. Shell Programming and Scripting
I'm trying to do something like this:
find . -name blablabla -exec ln -s ./"{:53:14} blablabla" \;
The idea is find blablabla and create a symbolic link to it using part of it's path and then it's name, "blablabla."
I just don't know if I can call characters out of a find variable. ... (16 Replies)
Discussion started by: scribling
16 Replies
LEARN ABOUT PHP
mongogridfsexception
MONGOGRIDFSEXCEPTION(3) 1 MONGOGRIDFSEXCEPTION(3)
The MongoGridFSException class
INTRODUCTION
Thrown when there are errors reading or writing files to or from the database.
CLASS SYNOPSIS
MongoGridFSException
MongoGridFSExceptionextends
MongoException
ERROR CODES
MongoGridFSException error codes
+-----+-------------------------------+---+---+
|Code | | | |
| | | | |
| | Message | | |
| | | | |
| | Reason | | |
| | | | |
+-----+-------------------------------+---+---+
| 3 | | | |
| | | | |
| | Could not open file $filename | | |
| | | | |
| | Attempting to store an | | |
| | invalid file, such as direc- | | |
| | tory | | |
| | | | |
| 4 | | | |
| | | | |
| | File $filename is too large: | | |
| | $filesize bytes | | |
| | | | |
| | Maximum filesize in GridFS is | | |
| | 4GB | | |
| | | | |
| 5 | | | |
| | | | |
| | could not find filehandle | | |
| | | | |
| | Resource doesn't have a file- | | |
| | handle | | |
| | | | |
| 6 | | | |
| | | | |
| | no file is associate with | | |
| | this filehandle | | |
| | | | |
| | Resource isn't a file | | |
| | resource | | |
| | | | |
| 7 | | | |
| | | | |
| | error setting up file: $file- | | |
| | names | | |
| | | | |
| | Could not open file for read- | | |
| | ing | | |
| | | | |
| 9 | | | |
| | | | |
| | error reading file $filenames | | |
| | | | |
| | Failed reading file | | |
| | | | |
| 10 | | | |
| | | | |
| | error reading filehandle | | |
| | | | |
| | Failed reading from a | | |
| | resource | | |
| | | | |
| 11 | | | |
| | | | |
| | could not find uploaded file | | |
| | %s | | |
| | | | |
| | Filename doesn't seem to be | | |
| | uploaded file | | |
| | | | |
| 12 | | | |
| | | | |
| | Couldn't find tmp_name in the | | |
| | $_FILES array. Are you sure | | |
| | the upload worked? | | |
| | | | |
| | Uploaded filename probably | | |
| | failed | | |
| | | | |
| 13 | | | |
| | | | |
| | tmp_name was not a string or | | |
| | an array | | |
| | | | |
| | Invalid filename given | | |
| | | | |
| 14 | | | |
| | | | |
| | couldn't find file size | | |
| | | | |
| | The $length property is miss- | | |
| | ing | | |
| | | | |
| 15 | | | |
| | | | |
| | Cannot find filename | | |
| | | | |
| | No filename provided, and no | | |
| | $filename property set | | |
| | | | |
| 16 | | | |
| | | | |
| | could not open destination | | |
| | file %s | | |
| | | | |
| | Destination filename not | | |
| | writable | | |
| | | | |
| 17 | | | |
| | | | |
| | error reading chunk of file | | |
| | | | |
| | Chunk corruption | | |
| | | | |
| 18 | | | |
| | | | |
| | couldn't create a php_stream | | |
| | | | |
| | Couldn't create a stream | | |
| | resource | | |
| | | | |
| 19 | | | |
| | | | |
| | couldn't find $property | | |
| | | | |
| | Chunk corruption | | |
| | | | |
| 20 | | | |
| | | | |
| | chunk $number has wrong size | | |
| | ($size) when the max is $max- | | |
| | chunksize | | |
| | | | |
| | Chunk larger then expected | | |
| | | | |
| 21 | | | |
| | | | |
| | chunk has wrong format | | |
| | | | |
| | Chunk corruption | | |
| | | | |
+-----+-------------------------------+---+---+
PHP Documentation Group MONGOGRIDFSEXCEPTION(3)