Might be better to test the return code rather than existence of file - this would pick up errors like unable to overwrite existing file because of permissions, lack of space etc, also I'd like a specific error message - but them I'm just picky
hi,
i wat to get the output of a grep command in a file. but when i am trying out the same grep command in the unix prompt its working fine.. i am getting the output properly.. but when i am writing the same command inside my shell script , its just creating a new output file with no contents... (1 Reply)
I have a command nested in some while loops to parse some data that looks something like this.
while ($condition)
while ($condition)
...
gzcat /dir/$fileName.gz | grep $searchString > out_file
end
end
On the first loop, the command is executed properly (and takes maybe 10... (3 Replies)
here is a typical question for everyone ...
How to convert a given shell script to binaric command along with its shell script switches.
Any !dea (1 Reply)
Hi All,
Is there any way to monitor a command inside shell script ? I have a script inside which I have a tar command which zips around 200GB data.
tar zcvf $Bckp_Dir/$Box-BaseBackup-$Day.tar.gz * --exclude 'dbserver_logs/*' --exclude postmaster.pid --exclude 'pg_xlog/*'
I want to... (3 Replies)
Hi guys. Good day, morning, afternoon or night, depending on where you live.
I have a script shell in which I am looping on files (absolute path) see code section above.
I always have an error: bad substitution.
:wall:
Is it because my variable file is the index of the loop and not a normal... (4 Replies)
hii,,
I am trying to automate jira. during my scripting using bash script, in the terminal i got the terminal message like this:
"Configure which ports JIRA will use.
JIRA requires two TCP ports that are not being used by any other
applications on this machine. The HTTP port is where you... (1 Reply)
Hello Unix Shell Script Experts,
I have a script that would mask the columns in .csv file or .txt file.
First the script will untar the .zip files from Archive folder and processes into work folder and finally pushes the masked .csv files into Feed folder.
Two parameters are passed
... (5 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
This script will analyse the channels.txt e registrations.txt and it will allow to mage the channels and the... (9 Replies)
Discussion started by: Demas
9 Replies
LEARN ABOUT REDHAT
unbin
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)