I have a file which has been created using two different systems and contains both the Unix and Dos file type.
ie. line ending with \r in some cases and \r\n in the rest.
How do I effectively convert this file into a DOS file and or Unix file?
This is what I have am trying, but not able to...
I have 3 file. Main file <File 1>, Reference File A <File 2> and B <File 3>.
- There may or may not exist a Matching ID and Mailing Address in each reference file.
- For each matching ID and Mailing address from reference file A and B, the set of records have to be "moved" to the...
I have this loop:
for transpart in a b c d
do
while read jpegimage pageseg
do
dest=$psegdir/$pageseg
if [ -f $extract/$jpegimage ] ; then
echo ConvertImages... converting $jpegimage
cat $extract/$jpegimage |jpegtopnm |pnmscale -xysize 2100 1680 |pgmtopbm -floyd...
Can you help me figure out how to write a awk / ksh or any unix script for this:
Eg: File to move: filename0001.out
Listing of files found at the location:
filename0001.out
filename0002.out
filename0003.out
Result:
filename0001.out
filename0002.out
filename0003.out
filename0004.out <-The...
I have the foll input file:
=============
1 TRUMAN
- CLINTON
0 GEORGE
===========EOF
For every 1st char, I have to do the following:
if 1st char is - leave 1 line before.
if 1st char is 0 leave 2 line before.
This is the expected output.
=============
1 TRUMAN
CLINTON
GEORGE...
I am trying to pass an argument to a script and use that argument in an awk statement. Is there something missing in the code? Its not working! It is creating a file with blank extension.
TIA
-KAT
#!/usr/bin/ksh
if [ $# != 2 ] ;then
echo "usage: $0 argument"
exit
fi...
Here is the problem with samples. Forget the "position" mentioned earlier.
Consider this as input:
ABCD 123456789
DERS 234234234
ERED 345634563
RTYR 343434343
TYUT 343434343
TERE 368876655
This is the expected output:
ABCD 123456789
DERS 234234234
ERED 455634563
RTYR 343434343 Y...
I have a script that matches two fields (at position 7 length 20 and position 479 length 6) and inserts character '01' and '02' on subsequent matching records. Works fine so far.
Now, I want to replace (say position 6) with 'Y' in the first record of the matching condition.
ie. When I get to...
No! there are some characters that are made up to 2 chars and only one white space gets replaced. I tried that and it messes the fixed length field length of records.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.