Search Results

Search: Posts Made By: later_troy
2,419
Posted By later_troy
Thank you, it works but do you mind explaining...
Thank you, it works but do you mind explaining what are you doing. It would be helpful to understand. the code.
2,419
Posted By later_troy
This might work but consider this 7789 (item...
This might work but consider this 7789 (item number) will not repeat again in entire file but store number (7345) will definitely occur again in file for other item number. In your solution we are...
2,419
Posted By later_troy
I have edited question with expected output. ...
I have edited question with expected output.

The shell is Bash.

Sorry for not being clear, let me explain this data format/requirement. Records that starts with XYZ contains item number...
2,419
Posted By later_troy
How can I retrieve the matching records from data file mentioned?
XYZNA0000778800Z
16123000012300321000000008000000000000000
16124000012300322000000007000000000000000
17234000012300323000000005000000000000000
17345000012300324000000004000000000000000...
9,410
Posted By later_troy
Wonderful !!! Thanks for examples.
Wonderful !!! Thanks for examples.
9,410
Posted By later_troy
What is the difference in this two awk command?
What is the difference in these two awk command? Both returns same output but I am not sure what is the use of +0 in command 1.



awk -F "," '{print $1+0,$2+0,$3+0}'

awk -F "," '{print $1,...
10,259
Posted By later_troy
All of these commands worked like charm cut...
All of these commands worked like charm

cut -b3- file1 > file2
LC_ALL=c awk '{print subset($0, 3)}' file1 > file2
LC_ALL=C sed 's/^..//' file1 > file2

Thank you so much "Don Cragun" and...
10,259
Posted By later_troy
Most of it went over my head only thing I...
Most of it went over my head only thing I understood that awk is not recognizing as a text file and so it isn't working. Ok so I tried and set the variable . After that command was still showing ...
10,259
Posted By later_troy
Here is the output from head -n3 file1 | tee...
Here is the output from

head -n3 file1 | tee file1.1-3 | awk '{print substr($0,3)}' | tee file2.1-3 | od -bc;

0000000 012 012 012
\n \n \n
0000003


Output of

locale
...
10,259
Posted By later_troy
I used this awk command from #19 which created...
I used this awk command from #19 which created file2 with blank lines

awk '{print substr($0,3)}' file1 > file2


On resulted file2 I ran your command

head -n1 file2 | od -bc


which...
10,259
Posted By later_troy
I already did that before see previous replies.
I already did that before see previous replies.
10,259
Posted By later_troy
Here is the output of head command. ...
Here is the output of head command.


0000000 347 003 062 060 061 066 060 061 060 063 061 066 063 070 061 065
347 003 2 0 1 6 0 1 0 3 1 6 3 8 1 5
0000020 104...
10,259
Posted By later_troy
The one I posted was from the system that return...
The one I posted was from the system that return blank lines and trust me it's same file copied from the system where it works and your cat -vet command shows same first 3 junk characters in both...
10,259
Posted By later_troy
There is no bad file, it's identical file on both...
There is no bad file, it's identical file on both system.
10,259
Posted By later_troy
Thanks for your explanation but we have tried...
Thanks for your explanation but we have tried this already and it doesn't work either. It still generates blank file2.
10,259
Posted By later_troy
This doesn't work awk -F"^..." '{print $2}'...
This doesn't work
awk -F"^..." '{print $2}' file > file2

It generates blank file2
10,259
Posted By later_troy
I don't understand what you mean by "above...
I don't understand what you mean by "above doesn't do anything that [code] wouldn't do". PLease explain.

awk version works: GNU Awk 3.1.3
awk version doesn't work: GNU Awk 3.1.7

Yes input...
10,259
Posted By later_troy
awk command not working as expected
Following one line of awk code removes first 3 characters from each line but when I run the same code on another linux platform it doesn't work and only prints blank lines for each record. Can anyone...
3,220
Posted By later_troy
In ksh script what is this BEGIN and END in this function?
Can Someone please explain why BEGIN and END statement is used inside function? How does that help in scripting?


function fileformatting
{
CleanupMask="xXxX"

sed 's/^.//' < ${AllFile} >...
1,504
Posted By later_troy
Sorry I am new to this forum, will use code tag...
Sorry I am new to this forum, will use code tag going forward. Thanks for your reply!
1,504
Posted By later_troy
What this while loop is doing?
Can anyone please explain what this code is doing for first 6 lines? I believe this is array but I couldn't understand what exactly it is doing.


set -A Dis_array 95
typeset -L2 distribution...
3,953
Posted By later_troy
What does xx mean in this while loop syntax?
I have a shell script which has this while loop line
"while read tblName xx; do..."
I understand how while loop works but don't know what does this xx stands for?
2,052
Posted By later_troy
Cut command doesn't remove (^C) character from only first line
I have a file which has first 2 junk characters(X^C) at beginning of each line in file. When i run cut -c 2- filename it removes junk characters from all lines except on first line it keeps one junk...
Showing results 1 to 23 of 23

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