10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi Folks,
I'm trying to write a simple file sanity check script. I have a directory with dozen CSV files containing id,edname,firstname,lastname,suffix,email.
I like to write a awk script to check if first field contain a number and is not empty. and fields number 3,4 & 6 are not empty and... (3 Replies)
Discussion started by: dc34684
3 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have a requirement where I have to check whether the mandatory columns in a pipe delimited file is null and print error message.
For eg, I have to check if the 3rd,5th,6th,7th and 8th column are null and print the message "<column name> is null".
The data file will have aroung 100,000... (6 Replies)
Discussion started by: reshma15193
6 Replies
3. Shell Programming and Scripting
Gents,
I have a file where i would like to check the constant increment by 2 in column 2.
5450 1000
5450 1002
5450 1004
5450 1006
5465 1000
5465 1002
5465 1006
5465 1008
5550 1002
5550 1004
5550 1006
5550 1008
6830 1000
6830 1002
6830 1008
6830 1010 (6 Replies)
Discussion started by: jiam912
6 Replies
4. Shell Programming and Scripting
Hi Guys,
I am new to shell script.I need your help to write a shell script.
I have a csv file which has 13 columns separated by ,
I have written below script to fetch required 5 columns.
awk -F, '(NR==1){h3=$3;h4=$4;h8=$8;h9=$9;h13=$13;next}(NF>1) \
{print... (5 Replies)
Discussion started by: Vivekit82
5 Replies
5. Shell Programming and Scripting
hi,
I had a small question.I had a file from which i need to extract data.
I have written the below script to check if the file exists and if it exists extract requierd columns from the file.
IFILE=/home/home01/Report_1.csv
OFILE=/home/home01/name.csv.out1
if #Checks if file exists... (1 Reply)
Discussion started by: Vivekit82
1 Replies
6. Shell Programming and Scripting
Hello experts,
I have a requirement where I have to implement two checks on a csv file:
1. Check to see if the value in first column is duplicate, if any value is duplicate script should exit.
2. Check to verify if the value at second column is between "yes" or "no", if it is anything else... (4 Replies)
Discussion started by: avikaljain
4 Replies
7. Shell Programming and Scripting
Hi ,
I have below data with fixed with of 52 bytes having three columns value data.
01930 MA GLOUCESTER
02033
02025 COHASSET
01960 MA ... (3 Replies)
Discussion started by: sonu_pal
3 Replies
8. UNIX for Dummies Questions & Answers
Hi Gurus,
I have a tab separated text file with two columns. I would like to make the first column values as headings for the second column values.
Ex.
>value1 subjects
>value2 priorities
>value3 requirements
...etc
and I want to have a file
>value1
subjects
>value2
priorities... (4 Replies)
Discussion started by: Unilearn
4 Replies
9. Shell Programming and Scripting
Hi All,
I have a file which is having 3 columns as (string string integer)
a b 1
x y 2
p k 5
y y 4
.....
.....
Question:
I want get the unique value of column 2 in a sorted way(on column 2) and the sum of the 3rd column of the corresponding rows. e.g the above file should return the... (6 Replies)
Discussion started by: amigarus
6 Replies
10. Shell Programming and Scripting
Hi All,
I have a table with 10 columns. Some columns(2nd,4th,5th,7th,8th and 10th) are Not Null columns. I'll get a tab-delimited file and want to check col by col and generate seperate error code for each col eg:102 if 2nd col value is NULL and 104 if 4th col value is NULL so on... I am a... (7 Replies)
Discussion started by: Mandab
7 Replies