|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Error handling for file
Hi Guys,
I got a csv with pipe delimted file and i want to check second column of the file has any alpha character becuase I am expecting only number in that, and if any alpha characters then it should throw an error Thanks in advance |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
Try: Code:
awk -F\| '$2~/[[:alpha:]]/{print "Alpha alert, oh no..."}' file |
| Sponsored Links | ||
|
![]() |
| Tags |
| error, file, handle, pipe |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Error handling | Learn4Life | Shell Programming and Scripting | 5 | 08-10-2012 01:05 AM |
| Perl file handling error | Beginer123 | Shell Programming and Scripting | 8 | 06-07-2012 03:50 AM |
| Error Handling | ambarginni | Shell Programming and Scripting | 4 | 02-16-2012 01:03 AM |
| Sum up a decimal column in a tab separated text file and error handling | pssandeep | UNIX for Dummies Questions & Answers | 5 | 02-24-2010 09:05 AM |
| Error Handling | CelvinSaran | Shell Programming and Scripting | 5 | 11-23-2009 12:15 PM |
|
|