Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Binary line being inserted while truncating a file Post 302381152 by akshay61286 on Thursday 17th of December 2009 09:24:14 AM
Old 12-17-2009
hi all,

sorry for replaying on this thread again.

but i came across this problem again,

to summarize , binary line of "^@" gets inserted into a file whenever i try to truncate it by > /filename. This has happened to files which had no other script/service writing to it.

though i tried to truncate the files by echo /dev/null > /filename, and am keeping my fingers crossed this time.

any insight into this rouge behaviour will be appreciated.

thanks in anticipation

cheers
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

truncating leading zeros of a column in a file

Hi I have a file in which I have 5 columns which are delimited by “|” as shown ABC|12|YAK|METRIC|000000019.5 XYZ|10|ABX|META|000000002.5 Now my requirement is to take the last column trim the leading zero's for that column values and write back to the same file in the same... (7 Replies)
Discussion started by: nvuradi
7 Replies

2. Shell Programming and Scripting

Truncating FILE data BASED ON A PATTERN

HI I HAVE A PROBLEM,MY SOURCE FILE IS OF PATTERN S1,E-Certified,29,29,2.7,Certified,4,3,2.7,,0,0,0 S2,Certified,4,3,2.7,,0,0,0,,0 S3,E-Certified,29,29,2.7,,0,0,0 S4,,0,0,0,,0,0,0,,0,0,0,,0,0,0 AND THE EXPECTED OUTPUT IS S1,E-Certified,29,29,2.7 S1,Certified,4,3,2.7... (1 Reply)
Discussion started by: pkumar3
1 Replies

3. Shell Programming and Scripting

Removing inserted newlines from a fileld of fixed width file.

Hi champs! I have a fixed width file in which the records appear like this 11111 <fixed spaces such as 6> description for 11111 <fixed spaces such as 6> some more field to the record of 11111 22222 <fixed spaces such as 6> description for 22222 <fixed spaces such as 6> some more field to the... (8 Replies)
Discussion started by: enigma_1
8 Replies

4. UNIX for Dummies Questions & Answers

Truncating file based on date

Hi, I need to truncate a file based on date.Suppose i have a log file which is getting updated every date,i need to keep 7 days worth of data(like sysdate-7) and rest i want to truncate it.Can some help me? (5 Replies)
Discussion started by: Param0073
5 Replies

5. Shell Programming and Scripting

sed truncating last line if EOF is not with newline

sed 's|^xyz.abc *= *.*|xyz.abc=60|' /test/myFile.properties > /test/myFile.properties1 myFile.properties has the last line as xyz.abc=23 does not end with newline. When I run this command the last line is truncated if there is no newline character at EOF. Looking for an alternative here. (1 Reply)
Discussion started by: sunn_hps
1 Replies

6. Shell Programming and Scripting

script to detect a file from inserted usb and puts into a Variable

There is a same named log file that I have on my 2 different android phones. When I plug it into my computer, it appears in the media folder, For example the first android phone: /media/F6BA-0AF5/folder/A.log I want to put that into a variable to be manipulated.... (3 Replies)
Discussion started by: tobenguyen
3 Replies

7. Shell Programming and Scripting

How to avoid the truncating of multiple spaces into a single space while reading a line from a file?

consider the small piece of code while read line do echo $line done < example content of example file sadasdasdasdsa erwerewrwr ergdgdfgf rgerg erwererwr the output is like sadasdasdasdsa erwerewrwr ergdgdfgf rgerg erwererwr the... (4 Replies)
Discussion started by: Kesavan
4 Replies

8. Shell Programming and Scripting

Truncating a mail file

Hi, I have a Unix mail file that I need to truncate, based on the date of the messages. For those not familiar with the format, it is a single file for each user, with the first line of the mail message looking like the following: From user@sitename.com Thu Apr 21 05:40:33 2011 Each... (3 Replies)
Discussion started by: joed
3 Replies

9. Shell Programming and Scripting

Convert binary file to csv and then back to the binary format

Hello *nix specialists, Im working for a non profit organisation in Germany to transport DSL over WLAN to people in areas without no DSL. We are using Linksys WRT 54 router with DD-WRT firmware There are at the moment over 180 router running but we have to change some settings next time. So my... (7 Replies)
Discussion started by: digidax
7 Replies

10. Shell Programming and Scripting

How to add new line after every data inserted to file?

Hi all, I need help for solve my problem. my problem is like this.. i want to add many word to file. but after I add 1 word, the second word should be in the under of the first word. i have tried but the result is like this word1word2word3 i want the result to be like this word1 word2... (5 Replies)
Discussion started by: weslyarfan
5 Replies
ASNMACRO(1)						     NCBI Tools User's Manual						       ASNMACRO(1)

NAME
asnmacro - process ASN.1 biological data per Sequin macros SYNOPSIS
asnmacro [-] [-b] [-d] [-e] [-i filename] -m filename [-o filename] [-p path] [-r path] [-s str] [-x str] DESCRIPTION
asnmacro is a command-line tool to run Sequin macros on annotated biological sequence data represented according to NCBI's ASN.1 specifica- tions. OPTIONS
A summary of options is included below. - Print usage message -b Input is Binary -d Output is binary -e Input is a Seq-Entry -i filename Single input file -m filename Macro file -o filename Single Output file -p path Path to multiple input files -r path Path for Results when processing multiple files -s str Suffix for stripped (output) files -x str Suffix for input files with -p (.sqn by default) AUTHOR
The National Center for Biotechnology Information. SEE ALSO
Psequin(1). NCBI
2011-09-02 ASNMACRO(1)
All times are GMT -4. The time now is 04:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy