![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to set the File Paths for Inputs and Outputs | Amruta Pitkar | UNIX for Dummies Questions & Answers | 1 | 10-31-2006 01:19 PM |
| Regarding checking the file format | sendhilmani123 | Shell Programming and Scripting | 8 | 05-30-2006 06:07 AM |
| Validating inputs from a file | sendhilmani123 | Shell Programming and Scripting | 1 | 05-10-2006 02:49 AM |
| Inputs from a file | sendhil | Shell Programming and Scripting | 4 | 02-01-2006 01:48 AM |
| Reading in two inputs from a file | MadHatter | Shell Programming and Scripting | 1 | 06-29-2005 07:17 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Checking the format of inputs in a file
Hi,
I have a script that takes the contents of another file as inputs. Its assumed that there are 3 values in the input file that are seperated by '|'. I have to check in my script, whether the filed seperator used in the input file is '|' or not. If its not a '|' I have to print a error message. How can I do it. Thanks in advnace. |
| Forum Sponsor | ||
|
|
|
|||
|
Hi,
The script works fine when there are no "|" symbols in the file. But even if one of them is present then it still says that the format is ok, which is not the exact way. ie.... I have inputs like this. Mani|123 prof This kind of input also is accepted by the script. But it should not accept. It should accept only if all the three field are seperated by "|". Thanks in advance |
|
||||
|
Quote:
|
|
|||
|
Hi,
The script is working fine for the following inputs: Mani|123|proff Mani 123|proff Mani|123 proff But when I just give '|||' in the input file it still tells me that its 'good'. Even when I give the input as Mani 123 proff|||, it tells that its good. Thanks in advance |