Search Results

Search: Posts Made By: joeyg
4,339
Posted By joeyg
2>/dev/null
redirects error output to "no where"
it is a common trick in programming unix

Why I used...
wanted to do a number comparison on a field
if number comparison was with a number, could do it
if...
4,339
Posted By joeyg
To take care of that issue...
I added a couple things in the middle of the program! (commented out one line; two new lines)

> cat conv_form
#! /bin/bash
#conv_form

ifile=file1
ofile=file9
rm $ofile 2>/dev/null
first=0...
4,339
Posted By joeyg
One approach in unix script
script:
> cat conv_form
#! /bin/bash
#conv_form

ifile=file1
ofile=file9
rm $ofile 2>/dev/null
first=0

while read zf
do
fourc=$(echo "$zf" | cut -c1-4)
if [ $fourc -gt 1 ]...
4,339
Posted By joeyg
Before/after clarification
You also show a drop of:
space character
first double-quote

Also, are all starting prefixes four digits?
Is there a range of numbers? i.e. >1000 and <2000 ?
4,339
Posted By joeyg
Are you just trying to eliminate <cr> and <lf> characters?
Perhaps I am missing something, but it appears that you are trying to eliminate single-instance <cr> <lf> between lines, but maintain when there are consecutive <cr> <lf> pairs. Thus, turn 6-7 lines...
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 11:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy