Search Results

Search: Posts Made By: bthomas
3,331
Posted By bthomas
String Processing
I had a file with 150k records in it and I ran a tr on it to remove all new lines/CR which created one large record(whoops). Is there a way to add a \n after every 39th character without using 'dd'...
2,613
Posted By bthomas
Issues with cut
We are running on a Sun cluster using ksh.

We have a script that has been running for about six months with no issues. The script has not been modified and our results are now coming out diffrent....
3,973
Posted By bthomas
worked great, thank you
worked great, thank you
3,973
Posted By bthomas
Add CR to a String
How can I add a carriage return to a string for every 35 characters within the string?

Basically reversing a tr where I removed the CR and LF's.

Thanks for the help!
6,316
Posted By bthomas
Use sed to delete a character
I built a 12 million record file and made a mistake, one field is 1 character too long.

The record is 40 bytes and ends always in 999. I am trying to delete the 37 character in each record. Is...
4,534
Posted By bthomas
sed -n...
sed -n '/^00/p;/^01/p;/^02/p;/^03/p;/^04/p;/^05/p;/^06/p;/^07/p' < /u01/bteam/CNAM/1121/lergtemp/LERGT|sort -y | tr -d "\n\r" > CWDA0414

works on the command line but not in the script
5,982
Posted By bthomas
Fixed issue
Looks as though there was some type of file contention, I simply decided to pipe the sed statements together and everything worked like a charm.
<Orig>
sed '0001,'$erange'!d' $hfile > $temp
sed...
4,534
Posted By bthomas
Issue with sed in script
I have a loop in a script that is given me an error but, when I do it on the command line it works perfectly. The sed statement has to use the variables from a file so the file is partitioned...
5,982
Posted By bthomas
It just sits there at the one condition untill I...
It just sits there at the one condition untill I perform the kill <process> then it continue's on. The debug isn't telling me to much.



I appreciate all of your suggestions.
5,982
Posted By bthomas
This simply strips out duplicates. The table I am...
This simply strips out duplicates. The table I am parsing has ranges in it
312 314 0000-9999
sometimes the next record would have the same value in it but a smaller range which has already been...
5,982
Posted By bthomas
The $hfile is a hidden file that contains static...
The $hfile is a hidden file that contains static values that I use a for global replace. I have to create anywhere from 1000 to 10000 block telephone numbers. the vales 0000 - 9999 never change. so I...
5,982
Posted By bthomas
Sorry my script had tabs and it didn't retain...
Sorry my script had tabs and it didn't retain them when I pasted in. I hope it is not too hard to read.
5,982
Posted By bthomas
Loops within loops
I am running on HPUX using ksh.

I have a script that uses a loop within a loop, for some reason the script seems to hang on a particuliar record. The record is fine and hits the condition in Blue....
5,712
Posted By bthomas
Rearranging fields from a pipe
I have a large file that I am pulling only certain fields out of but my output I would like to rearrange the field order via a pipe. I have been looking through the site and man pages and have come...
Showing results 1 to 14 of 14

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