I have a file that contains the following lines
the brown quick fox
jumped over
the white laze dog
0123456789
I wanted to put the contents of this file into a variable so I used this code:
VAR_LIST=`cat $2`
where $2 is the file name passed as an argument to the script
If I... (3 Replies)
Hi folks,
i need to insert the same set of lines between each line
input lines
111111
aaaaaa
333333
output should be
111111
1
2
3
aaaaaa
1
2
3
333333
1 (2 Replies)
So, this issue is driving me nuts! I was hoping to get a lending hand here...
I have 2 files:
file1.txt contains:
this is example1
this is example2
this is example3
this is example4
this is example5
file2.txt contains:
example3
example5
Basically, I need a script or command to... (4 Replies)
Hi,
I have a file like this
cpsSystemNotifyTrap='2010/12/14 11:05:31 CST' Manufacturer=IBM ReportingMTMS=n/a ProbNm=26 LparName=n/a FailingEnclosureMTMS=7946-IQL*99G4874 SRC=B3031107 EventText=Problem reported by customer. CallHome=true Calendar
I want to have a output like this... (6 Replies)
Hello everyone,
ive been trying to replace a string "kw01" in an xml file with the contents of a txt file having multiple lines. im a unix newbie and all the sed combinations i tried resulted to being garbled. Below is the contents of the txt file:
RAISEDATTIME
--------------------... (13 Replies)
Hello,
I have a file with tab delimited columns like:
File1
A 2 C R
F 4 D Q
C 9 A B
......
I want to grep out the lines in a second file, File2, corresponding to each line in File1
Can I do this:
while read a b c d
do
grep '$a\t$b\t$c\t$d' File2 >>... (2 Replies)
Hi,
I copied the contents of a binary file into a .text file using hd (hexdump) command. The data in binary file is such that I get in many places like following
00000250 00 00 00 00 3f 2d 91 68 3f 69 fb e7 00 00 00 00 |....?-.h?i......|
00000260 00 00 00 00 00 00 00 00 00 00 00 00 00... (2 Replies)
Hello friends! I am working a Psychology/Neuro* project where I am sorting inline citations by category. The final step of the process has me a little stuck. I need to take citations from a text list and sort them in another text file.
Here is a file X example... (1 Reply)
Hello all,
I have a large csv file where there are four types of rows I need to merge into one row per person, where there is a column for each possible code / type of row, even if that code/row isn't there for that person.
In the csv, a person may be listed from one to four times... (9 Replies)
Hi,
I'd be grateful for your help with the following. I have a file (file.txt) with 10 columns and about half a million lines, which in simplified form looks like this:
ID Col1 Col2 Col3....
a 4 2 8
b 5 6 1
c 8 4 1
d... (4 Replies)
Discussion started by: aberg
4 Replies
LEARN ABOUT REDHAT
unhex
MEGATRON(1) General Commands Manual MEGATRON(1)NAME
megatron, unhex, unbin, unsingle, hqx2bin, single2bin, macbinary - Macintosh file format transformer
SYNOPSIS
megatron [ sourcefile... ]
unbin [ sourcefile... ]
unhex [ sourcefile... ]
unsingle [ sourcefile... ]
hqx2bin [ sourcefile... ]
single2bin [ sourcefile... ]
macbinary [ sourcefile... ]
DESCRIPTION
megatron is used to transform files from BinHex, MacBinary, AppleSingle, or netatalk style AppleDouble formats into MacBinary or netatalk
style AppleDouble formats. The netatalk style AppleDouble format is the file format used by afpd, the netatalk Apple Filing Protocol
(AppleShare) server. BinHex, MacBinary, and AppleSingle are commonly used formats for transferring Macintosh files between machines via
email or file transfer protocols. megatron uses its name to determine what type of tranformation is being asked of it.
If megatron is called as unhex, unbin, or unsingle, it tries to convert file(s) from BinHex, MacBinary, or AppleSingle into AppleDouble
format. BinHex is the format most often used to send Macintosh files by e-mail. Usually these files have an extension of ".hqx". MacBi-
nary is the format most often used by terminal emulators "on the fly" when transferring Macintosh files in binary mode. MacBinary files
often have an extension of ".bin". Some Macintosh LAN-based email packages use uuencoded AppleSingle format to "attach" or "enclose" files
in email. AppleSingle files don't have a standard filename extension.
If megatron is called as hqx2bin, single2bin, or macbinary, it will try to convert the file(s) from BinHex, AppleSingle, or AppleDouble
into MacBinary. This last translation may be useful in moving Macintosh files from your afpd server to some other machine when you can't
copy them from the server using a Macintosh for some reason.
If megatron is called with any other name, it uses the default translation, namely unhex.
If no source file is given, or if sourcefile is `-', and if the conversion is from a BinHex or MacBinary file, megatron will read from
standard input.
The filename used to store any output file is the filename that is encoded in the source file. MacBinary files are created with a ".bin"
extension. In the case of conflicts, the old file is overwritten!
SEE ALSO afpd(8)netatalk 1.2 8 Jan 1992 MEGATRON(1)