Search Results

Search: Posts Made By: Drenhead
1,426
Posted By Drenhead
Great. That makes a lot more sense to me now. ...
Great. That makes a lot more sense to me now. Not sure what they were trying with the previous code.

Thanks for the help.
1,426
Posted By Drenhead
Ok. I think it is trying to sort byte 1 for 3...
Ok. I think it is trying to sort byte 1 for 3 bytes, then byte 12 for 4 bytes. How would that statement work?
1,426
Posted By Drenhead
Are you saying that -k 4,12 would do the same...
Are you saying that -k 4,12 would do the same thing? Would that make more sense?
1,426
Posted By Drenhead
Sort command question
I have a question about what the sort command is doing.

Here is some sample data:


348201310013RVE 2
600201310013GFJ 70
3302013020101NS 40
600201309013GFJ 70
...
2,697
Posted By Drenhead
awk to insert line previous to a pattern?
I have a very long line with certain patters embedded in there. I need to be able to read that line, and when it encounters that pattern, create a new line.

I want the pattern to be the beginning...
1,923
Posted By Drenhead
Thanks, but I'm not sure what that printf is...
Thanks, but I'm not sure what that printf is doing.

I was able to sort of get it to working by changing my code to :


nawk 'BEGIN { FIELDWIDTHS = "15 10" } ; { arr[$1] += $2 } END {for (i in...
1,923
Posted By Drenhead
Ok, new twist. The input file format has changed...
Ok, new twist. The input file format has changed and no longer has delimiters in it. Here is an example.


9652013010129KM 1
9652013010129KM 4
9652013010129KN 4...
1,923
Posted By Drenhead
Thanks so much to both of you. I think nawk...
Thanks so much to both of you. I think nawk fixed the problem.
1,923
Posted By Drenhead
Thanks for your reply. When I try your code,...
Thanks for your reply.

When I try your code, I get the following:


awk: syntax error near line 1
awk: bailing out near line 1


Here is my exact code that I tried:


awk 'BEGIN { FS =...
1,923
Posted By Drenhead
Help summing a file using awk
I'm trying to sum a text file using AWK. Here is an example of the file:


600|3H68| 46
600|3H69| 46
600|3H6F| 290
600|3H6G| 24
600|3HDY| 1
600|3HDY| ...
1,637
Posted By Drenhead
Thanks a bunch. -i didn't work on my system,...
Thanks a bunch.

-i didn't work on my system, but moving it to a new file did work. Thanks so much for your help.
1,637
Posted By Drenhead
How can I edit this file then? Can I output the...
How can I edit this file then? Can I output the changes to a different filename? I just need to edit the dates, but can't figure it out.
1,637
Posted By Drenhead
sed issue
I'm trying to change a date in a couple of large files using SED. The problem is when I use the -n parameter, it doesn't actually change the file. When I leave out the -n, it sends the whole file...
2,272
Posted By Drenhead
Sorry, i don't see any example that you sent on...
Sorry, i don't see any example that you sent on how to strip out the records in question.
2,272
Posted By Drenhead
Thanks. I have copied my original file.
Thanks. I have copied my original file.
2,272
Posted By Drenhead
Thanks everyone. The original answer actually...
Thanks everyone. The original answer actually worked for my purposes. Now, is there any way to remove those lines from the file and put them in another file?

I was able to put them in another...
2,272
Posted By Drenhead
Thanks! I'll give that a shot.
Thanks! I'll give that a shot.
2,272
Posted By Drenhead
Can't figure out how to find specific characters in specific columns
I am trying to find a specific set of characters in a long file. I only want to find the characters in column 265 for 4 bytes.

Is there a search for that? I tried cut but couldn't get it to...
1,318
Posted By Drenhead
PERFECT! Thanks so much. I knew it would be...
PERFECT! Thanks so much. I knew it would be easy but it was driving me crazy.
1,318
Posted By Drenhead
Easy cat question
I am having problems getting a list of filenames that I want from a directory.

example: I have 3 files - filename.xxx.20110505.123030
...
1,217
Posted By Drenhead
I have another wrinkle to add. I create a test...
I have another wrinkle to add. I create a test script with your code and it works. Thanks for that. I also ran it with my code and it works as well when run manually.

It looks like the problem...
1,217
Posted By Drenhead
Another mailx question
I have a script that runs every night that is supposed to send a log file to a list of email addresses. When I run this command from the command prompt, it works successfully:

mailx -s "Filename...
6,771
Posted By Drenhead
.mailrc question
I am logging into a unix box with my personal ID, then su into an application ID to run a script. The script will email a log file at the end. I need to set up a group of users to send to.

I...
2,629
Posted By Drenhead
Extracting email address using basename
Is it possible to use a variable as the delimiter using basename?

I have a num variable that will be changing in the filename now.
The files could looke like this
...
1,931
Posted By Drenhead
That worked! Can you give me a quick explanation...
That worked! Can you give me a quick explanation of what it is doing? Sorry, I'm pretty new to scripting.
Showing results 1 to 25 of 26

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