Search Results

Search: Posts Made By: Bobby_2000
2,211
Posted By Bobby_2000
Removing line breaks inside a field
Hi all,

I have a csv input file with total 60 fields and the fields are not enclosed with double quotes.One of the field(50th field) in this file has line breaks in it which results in the row...
1,540
Posted By Bobby_2000
Coverting multiple lines to a single line
Ravindersingh,

The sample output given by me is correct.We shouldn't sort or reorder the records on the first column.The comparison of first field should happen between two consecutive lines only....
1,540
Posted By Bobby_2000
Coverting multiple lines to a single line
Hi all,

I have a requirement to covert multiple lines in a comma delimited file to a single line through shell scripting. We should compare the data in the first column in each line. If it is...
2,355
Posted By Bobby_2000
Thank you Ravinder.I used nawk and it works.
Thank you Ravinder.I used nawk and it works.
2,355
Posted By Bobby_2000
Hi Rudi, I tried according to your code but...
Hi Rudi,

I tried according to your code but I am getting error:


$ awk -F, 'NR==FNR {E[$2]; next} {for (e in E) if ($0 ~ e) R[e]++} END {for (r in R) print r, ":", R[r]}' errorfile logfile...
2,355
Posted By Bobby_2000
Finding matching patterns in two files
Hi,

I have requirement to find the matching patterns of two files in Unix. One file is the log file and the other is the error list file. If any pattern in the log file matches the list of errors...
9,542
Posted By Bobby_2000
Capturing error codes in SFTP commands
Hi,
I have been using the SFTP commands in my reusable shell scripts to perform Get/Put operation. The script has a list of 6 errors which i am capturing through the log file using grep command.
...
1,234
Posted By Bobby_2000
Splitting a filed into multiple fields using awk
Hi,

I have a tab delimited file as below:


AWA Divi DD01 None 1 2 Room AC 01-MAY-15 31-OCT-15 OT 01-MAY-15 31-OCT-15 CF 01-MAY-15 31-OCT-15
AW0 Beach DD02 None 1 2 Double AC 01-MAY-15...
1,919
Posted By Bobby_2000
Hi, I rewrote the code as below: ...
Hi,

I rewrote the code as below:
#!/bin/ksh

file2=$2
file=$1
echo file=$file
echo file2=$file2
final_string=`echo $file | awk -v file="${file}" -v file2="${file2}" '{print...
1,919
Posted By Bobby_2000
awk substr issue
Hi,

I am trying to print last few characters of a string but unable to get the correct output through awk substr.

The length of the string and the number of characters to be printed varies day...
Showing results 1 to 10 of 10

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