Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: alfredo123
947
Posted By alfredo123
awk command worked.
Sincere appreciation for the response provided. Unfortunately I do not have Perl so the perl option would not work for me. The awk command provided worked but I would certainly like to understand...
947
Posted By alfredo123
Operating System: GNU/Linux AWK Version: GNU...
Operating System: GNU/Linux
AWK Version: GNU Awk 3.1.7

I am not sure yet as to the source system whether it is Unix or DOS but I know that End of Message is denoted by: $. File will be processed...
947
Posted By alfredo123
Sorting file with CRLF within field, RS=$
OK below is what my sample file looks like. I need to sort by the Primary Key ie: {1:F01SAESVAV0AXXX0466020126} in the first record. Record seperator is $.

I tried sort, but it completely messes...
1,366
Posted By alfredo123
Thank you for the reply. Unfortunately I was...
Thank you for the reply. Unfortunately I was looking up some results on google and did not check that rename is only available in perl.

I would like to see if there was a one line command that i...
1,366
Posted By alfredo123
Multiple File Rename based on pattern - one line
All,

I wanted to copy the files

From:

Daily_XYZ_TEST_1.csv
Daily_XYZ_TEST_2.csv
Daily_XYZ_TEST_3.csv
Daily_XYZ_TEST_4.csv

To:

Daily_ABC_TEST_1.csv
Daily_ABC_TEST_2.csv...
2,437
Posted By alfredo123
The pattern does not exist in a line per se....it...
The pattern does not exist in a line per se....it is part of the line...the problem I am having is that the pattern needs to be replaced with another pattern....The previous seems to be just putting...
2,437
Posted By alfredo123
There is no OFS..this is an xml file. I apologize...
There is no OFS..this is an xml file. I apologize I should have mentioned that before. Only the pattern that I am looking for needs to be changed to lower case atleast.

---------- Post updated at...
2,437
Posted By alfredo123
Find and Replace pattern in lowercase
I have an xml file. I need to convert a particular pattern to lower case and add 1 to it. For example my sample values in file are:

ergeAAwrgersc_DWSTAGE_AC_DBO_TBL_GROUPZONES_INITIAL.badAAergerg...
2,673
Posted By alfredo123
PERL SSH call error
I have a Perl Script

#!/usr/local/bin/perl

$server_name = "info-xyz-05";

my $value = `/usr/bin/ssh -f $server_name /users/salesadm/MGFINFA/bridgerftpup.sh`;

The above calls a shell script...
2,761
Posted By alfredo123
I really don't want to mess with the keys. I do...
I really don't want to mess with the keys. I do not believe I have access to the keys but if nothing else works then I will have to request permission.

Anyhow something like the below works for...
2,761
Posted By alfredo123
SFTP scenario
#!/usr/bin/ksh

Archive_Dir='/apps/SrcFiles/MTCHG_GFTS/BRGR/Archive'
Source_Dir='/apps/SrcFiles/MTCHG_GFTS/BRGR'

cd $Source_Dir

HOST='xyz.abc.com'
USER='abcOUT'
PSW='xyzOUT'...
2,430
Posted By alfredo123
Unix.com still rocks!! nawk didnt work coz my box...
Unix.com still rocks!! nawk didnt work coz my box didnt have it...but I tried it with awk and it works perfectly!

Thanks much...if it is not too much of an effort do you care to explain?
2,430
Posted By alfredo123
Convert first line into column
I have a file:


2009_11
3455 500
5355 600
7777 700

The first line is the period. I want to concatenate the Period into every line using a one line command..I guess maybe awk or something....
6,781
Posted By alfredo123
Works...thanks Shell!
Works...thanks Shell!
6,781
Posted By alfredo123
find and replace variable
Is there an easy way of doing this

cat file1

jkasjhjgfg LTRIM(RTRIM(aa_bb_cde))
aragsfdg LTRIM(RTRIM(aa_bb_cde)) aregfafdgfg
sdgsfdagdfg gadfg
eafgsadgsa
asdgsfdgag LTRIM(RTRIM(aa_bb_cde))...
5,037
Posted By alfredo123
Awesome man...it works.... Thanks so much!!!!
Awesome man...it works....

Thanks so much!!!!
5,037
Posted By alfredo123
batch file--bunch of commands
I have a batch file that takes 2 parameters--source file location and target file location.

I want to create another batch file that contains all the commands with the file locations so that I...
6,472
Posted By alfredo123
Awesome aigles...it works....thanks a bunch!
Awesome aigles...it works....thanks a bunch!
6,472
Posted By alfredo123
I got it to work...however I think you might have...
I got it to work...however I think you might have misunderstood my requirement. I need to sort blocks based on the first line. THe data within the block needs to remain the same --should not change....
6,472
Posted By alfredo123
Thanks for you response..on trying that this is...
Thanks for you response..on trying that this is the error I get
csplit: b: No such file or directory
sort: open failed: xx??: No such file or directory??

Let me rephrase the question and post...
6,472
Posted By alfredo123
Sorting blocks of data
Hello all,

Below is what I am trying to accomplish:

I have a file that looks like this

/* ----------------- xxxx.y_abcd_00000050 ----------------- */

jdghjghkla
sadgsdags
asdgsdgasd...
8,665
Posted By alfredo123
Replace Junk chars (Sed)
I know this has been asked previously on this forum...But I think I have a different scenario to present.

I ahve a file tht looks like this (note:there are control Z and other chars tht are not...
28,661
Posted By alfredo123
Try this... cat -n <filename>| sort -r | cut...
Try this...

cat -n <filename>| sort -r | cut -f2-20 > reversedfile

Experts please comment if anything wrong with this.... :cool:
2,390
Posted By alfredo123
Success
Thanks reborg and Gop...i did not completely understand reborgs script--what is typset?
So I continued to work on the one from gop. This is what worked for me:



#!/bin/ksh
# Check if line...
2,390
Posted By alfredo123
AWK issue--> Help requested
Fairly new scripter so please bare with me if what I have done below is not according to standards.

Okay...heres what I am trying to do. I have a pattern that I need to search for in a directory....
Showing results 1 to 25 of 52

 

Featured Tech Videos

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