10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have several questions about using awk. I'm hoping someone could lend me a hand. (I'm also hoping that my questions make sense.)
I have a file that contains pipe separated data. Each line has similar data but the number of fields and the field position on each line is variable. ... (3 Replies)
Discussion started by: Cheese64
3 Replies
2. Shell Programming and Scripting
I am using below code to find the length of first column additionally I want the complete row which length is greater than 12.at the end I want the rows where first column data length is greater than 12.
Just it should validate and highlight the rows where length(first column) is greater than... (5 Replies)
Discussion started by: srivalli
5 Replies
3. Shell Programming and Scripting
I have sourcefile and structure of source file,i want to check whether datatype and length mention in emp.txt is same as source file.
Example:
in emp.txt first row contains sno number so in source file also first column should contain only number if data is other than number then that... (1 Reply)
Discussion started by: katakamvivek
1 Replies
4. Shell Programming and Scripting
Hi,
I have a issue, I need to loop through a comma delimited file and check for the length which exceeds specified length , if Yes truncate the string.
But my problem is , I do not have to check for all the fields and the field lenght is not same for all the fields.
For ex:
Say my line... (9 Replies)
Discussion started by: rashmisb
9 Replies
5. Shell Programming and Scripting
Hi guys, I have a piece of snippet below which asks the user to input some numbers
if isDatasubEnabled && isReconEnabled; then
echo "1 = CGT, 2 = Subscriber, 3 = Order Monitor, 4 = Revaluations, 5 = Reconciliation, 6 = All, 7 = Exit"
elif isDatasubEnabled &&... (4 Replies)
Discussion started by: pyscho
4 Replies
6. Shell Programming and Scripting
How can i validate if user inserted date and optionly a time is vaild but in awk scripting? (18 Replies)
Discussion started by: tal
18 Replies
7. Shell Programming and Scripting
I've got a file that would have lines similar to:
12345678 x.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00
23456781 x.00 xx.00 xx.00 xx.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00
34567812 x.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00
45678123 x.00 xx.00 xx.00 xx.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00 xx.00... (10 Replies)
Discussion started by: Cailet
10 Replies
8. Shell Programming and Scripting
I am attempting to use awk to validate the length of each line in a fixed-width raw data file prior to reading in the data. I am happy with....
{if (length() == 403)
print > "valid.file";
else
print > " invalid.file"
}
...to separate out the valid length lines from invalid length... (3 Replies)
Discussion started by: en7smb
3 Replies
9. Shell Programming and Scripting
Hi,
I have a script called read.sh that takes a file as input. Now I want to make that script take the file as input with a -f option preceding the filename. How can I do this validation. How can I find whether the given option is -f or not inside the script.
Thanks in advance (2 Replies)
Discussion started by: sendhilmani123
2 Replies
10. UNIX for Advanced & Expert Users
Hi ,
This is a general doubt....
Is there any way to do data validation inside an awk script..
Let me make it more clear....
I have a string variable inside awk script .. Is there any way to check whether it is number or string etc...
Thanks in advance.
Shihab (1 Reply)
Discussion started by: shihabvk
1 Replies