Search Results

Search: Posts Made By: Raul_Rodriguez
3,446
Posted By Raul_Rodriguez
I have solved the issue. Solaris uses GAWK...
I have solved the issue. Solaris uses GAWK compared to AWK. The script is running again(as intended). Thanks for looking into this.:)
Forum: Solaris 05-01-2017
1,268
Posted By Raul_Rodriguez
Thanks you guys the answer was as simple as...
Thanks you guys the answer was as simple as changing the awk to gawk.

Problem solved.
Forum: Solaris 05-01-2017
1,268
Posted By Raul_Rodriguez
awk command error in Solaris
I have the following code that works perfectly in Cygwin $ awk -F, '
BEGIN {months ["JAN"]="AP01"; months ["FEB"]="AP02"; months ["MAR"]="AP03";
months ["APR"]="AP04"; months...
3,446
Posted By Raul_Rodriguez
@RudiC Yes, there was a dot missing compared to...
@RudiC
Yes, there was a dot missing compared to Post # 20. Here is the code as it resides in the server.
awk -F, '
BEGIN {months ["JAN"]="AP01"; months ["FEB"]="AP02"; months ["MAR"]="AP03";
...
3,446
Posted By Raul_Rodriguez
@RudiC $ awk -F, ' BEGIN {months...
@RudiC
$ awk -F, '
BEGIN {months ["JAN"]="AP01"; months ["FEB"]="AP02"; months ["MAR"]="AP03";
months ["APR"]="AP04"; months ["MAY"]="AP05"; months ["JUN"]="AP06";
months...
3,446
Posted By Raul_Rodriguez
Well that did it :) The extra dot and after...
Well that did it :)
The extra dot and after replacing the print with the print > the files were built as expected.
You have no idea how grateful I am. Thanks for your efforts and your patience. I...
3,446
Posted By Raul_Rodriguez
RudiC I have copied exactly what you had on...
RudiC
I have copied exactly what you had on your last reply, here are the results.
Raul@Raul-PC ~
$ awk -F, '
> BEGIN {months ["JAN"]="AP01"; months ["FEB"]="AP02"; months ["MAR"]="AP03";
> ...
3,446
Posted By Raul_Rodriguez
RudiC, I guess I am having problems following...
RudiC, I guess I am having problems following directions. If I use the code as is I get this results:
Raul@Raul-PC ~
$ {TMP = FILENAME
-bash: {TMP: command not found

Raul@Raul-PC ~
$ ...
3,446
Posted By Raul_Rodriguez
I did add the proposed changes if I leave the...
I did add the proposed changes if I leave the curly bracket before the declaration of the temporary variable it does not change the file name. If I place it before the print command, it adds a 1 to...
3,446
Posted By Raul_Rodriguez
Here is the whole process: Multiples files...
Here is the whole process:

Multiples files are deposited in an inbox folder
File names vary but they are all .txt
Each file has month and year identifier on each line
The awk script...
3,446
Posted By Raul_Rodriguez
I am currently using Cygwin64 Terminal for...
I am currently using Cygwin64 Terminal for testing purposes, once successfully tested I will use this code or a variation of it in a software named Automic.
This software is object based and it can...
3,446
Posted By Raul_Rodriguez
The expected result should be 8 files: ...
The expected result should be 8 files:

a_STAVOSHFM_ACTUAL_AP06-2015_RR.txt

NOT

a_STHCPSHFM.txt_ACTUAL_AP022016_RR.txt

Again, the idea is to be able to identify the file but the file...
3,446
Posted By Raul_Rodriguez
I have remove the quotes. I get this: -bash:...
I have remove the quotes. I get this:
-bash: Done: Command not found
3,446
Posted By Raul_Rodriguez
I appreciate your answer, however,I have tried...
I appreciate your answer, however,I have tried multiple iterations of the following changes to no avail.
"#!/usr/bin/awk -f"
For EACHFILE in *
Do
awk -F, 'BEGIN {months ["JAN"]="AP01"; months...
3,446
Posted By Raul_Rodriguez
Use portion of file name as new file name
Hello, This is my first posting and attempt to create a loop using Unix and awk commands. So far this is what I have:
awk -F, 'BEGIN {months ["JAN"]="AP01"; months ["FEB"]="AP02"; months...
Showing results 1 to 15 of 15

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