Thanks a lot! I doubt I would have ever figured that out! Did some more research and foundthat BINMOD=1 is the same as BINMODE=r (2: =w, 3: =rw). Letters seem more clear to me.
Mike
PS. An even more straightforward approach I tried and discarded now works as well:
---------- Post updated at 02:53 PM ---------- Previous update was at 02:06 PM ----------
This does not work in a pipe (just freezes). I was piping in from a tail command (stripping off headers from multiple files) so I had to change it.
tail was tolorant of missing files, awk is not so in one database I needed to create a blank archive.
Mike
Last edited by Michael Stora; 05-21-2015 at 06:59 PM..
will this script work? I want to use it in unix.
clear
ans='y'
While test $ans='y'
do
notfound()
{
echo $response " is not logged in"
}
found()
{
echo $response "is logged into " $name
}
name=`ps -eaf | grep "\<$response\>" | cut -b 80-85`
if
;
then
name=`rsh server2 ps -eaf... (7 Replies)
Hi, i have a problem with mi Aix system, the errlog file is initialized to 0, and i can't write in it, when i run the errpt teh error
0315-180 logread: UNEXPECTED EOF
0315-171 Unable to process the error log file /var/adm/ras/errlog.
0315-132 The supplied error log is not valid:... (2 Replies)
I have been reading up on starting a website, but i am still lost. I am in much need of assistance. Kind of a step by step because i still don't know where to start. please help. thank you (1 Reply)
First time so excuse my ignorance please.
I may not be accurately describing the issue.
I have inherited a small lab mostly SUN V120s.
We lost power and are trying to recover.
Nope no backups...
The primary issue I have is 1 box is an Oracle Server.
It has 2 36Gb harddrives.
I am able to... (3 Replies)
Fair warning... I know nothing of Unix. That's why I joined this forum and I need your feedback desperatly. Here is the situation...
I built an app using ASP and Northcode's SWF Studio v3 for a cd launcher tool for a client that develops software. They like the app and it works well on... (2 Replies)
I have been using linux now for about 6 months. I like it although it was quite a learning process. Pretty simple for the most part. Here is my prob...
The first time I installed linux on my computer it went in just fine, no problems.
It did eventually crash though and I had to re-install it.... (2 Replies)
I want to execute my own utilities from my bin folder without having to specify paths at run time - i.e. just enter name on command line - to do
this my search path needs to be set up at login time - when I do this the path is not getting set right apparently(?) - PATH echos OK but the search... (0 Replies)
I am taking an online Linux class, which is mandatory for me to graduate. Unfortunately I got the worst online teacher ever, he never respond to any e-mails. I have no idea what going on in this class so I am turning to you guys.
Here is the questions for the week, Ok I don't expect anybody to... (1 Reply)
Hello,
I have this awk code in a bash script to perform a find and replace task. This finds one unique line in a file and substitutes the found line with a replacement.
#! /bin/bash
# value determined elsewhere
total_outputs_p1=100
# file being modified... (5 Replies)
Discussion started by: LMHmedchem
5 Replies
LEARN ABOUT PHP
dos2unix
dos2unix(1) User Commands dos2unix(1)NAME
dos2unix - convert text file from DOS format to ISO format
SYNOPSIS
dos2unix [-ascii] [-iso] [-7] [-437 | -850 | -860 | -863 | -865] originalfile convertedfile
DESCRIPTION
The dos2unix utility converts characters in the DOS extended character set to the corresponding ISO standard characters.
This command can be invoked from either DOS or SunOS. However, the filenames must conform to the conventions of the environment in which
the command is invoked.
If the original file and the converted file are the same, dos2unix will rewrite the original file after converting it.
OPTIONS
The following options are supported:
-ascii Removes extra carriage returns and converts end of file characters in DOS format text files to conform to SunOS require-
ments.
-iso This is the default. It converts characters in the DOS extended character set to the corresponding ISO standard charac-
ters.
-7 Converts 8 bit DOS graphics characters to 7 bit space characters so that SunOS can read the file.
On non-i386 systems, dos2unix will attempt to obtain the keyboard type to determine which code page to use. Otherwise, the default is US.
The user may override the code page with one of the following options:
-437 Use US code page
-850 Use multilingual code page
-860 Use Portuguese code page
-863 Use French Canadian code page
-865 Use Danish code page
OPERANDS
The following operands are required:
originalfile The original file in DOS format that is being converted to ISO format.
convertedfile The new file in ISO format that has been converted from the original DOS file format.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWesu |
+-----------------------------+-----------------------------+
SEE ALSO unix2dos(1), ls(1), attributes(5)DIAGNOSTICS
File filename not found, or no read permission
The input file you specified does not exist, or you do not have read permission. Check with the SunOS command, ls -l (see ls(1)).
Bad output filename filename, or no write permission
The output file you specified is either invalid, or you do not have write permission for that file or the directory that contains it.
Check also that the drive or diskette is not write-protected.
Error while writing to temporary file
An error occurred while converting your file, possibly because there is not enough space on the current drive. Check the amount of
space on the current drive using the DIR command. Also be certain that the default diskette or drive is write-enabled (not write-pro-
tected). Notice that when this error occurs, the original file remains intact.
Translated temporary file name = filename.
Could not rename temporary file to filename.
The program could not perform the final step in converting your file. Your converted file is stored under the name indicated on the
second line of this message.
SunOS 5.10 14 Sep 2000 dos2unix(1)