10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need a script to check the records in a file , if any value match transfer the record in error.txt file.
1- If any of the any field value is NULL(nothing in this field)
Record1|Record2|Record3|Record4|Record5|DATE1|DATE2
Example:
11111111|22222222|NULL|12|444|27042018|27042018... (8 Replies)
Discussion started by: vivekn
8 Replies
2. UNIX for Dummies Questions & Answers
Hi All
I have a .dat file, the values are seperated by ". I wish to identify all field values in field 14 that are not '01-APR-2013' band then copy those records to a new file. Can anyone suggest the UNIX command required.
Thanks in advance
Andy (2 Replies)
Discussion started by: aurum1313
2 Replies
3. Shell Programming and Scripting
HI,
I have one file which is as below
cat /var/tmp/test1 | awk '{ print $3}'|grep -v affected
Data
----------
200.4
. The above 200 value is changable by the database script.
Now I need a script that checks the value 200.4 and the script shoud give out put if value is more than 225 (2 Replies)
Discussion started by: phani4u
2 Replies
4. Shell Programming and Scripting
Hi Freinds,
I have 2 files . one is source.txt and second one is target.txt. I want to keep source.txt as baseline and compare target.txt. please find the data in 2 files and Expected output.
Source.txt
1|HYD|NAG|TRA|34.5|1234
2|CHE|ESW|DES|36.5|134
3|BAN|MEH|TRA|33.5|234... (5 Replies)
Discussion started by: i150371485
5 Replies
5. Shell Programming and Scripting
Hi Friends,
Need Help. I have file1.txt as
File1.txt
|123|A|7267|Hyder|Cross|Sell|7801
|995|A|7051|2008|Lunar|New|Year|Promotion|7801
|996|A|7022|Q108|Targ|Prospect|&|SSCC|Savings|Promo|7801
|997|A|7182|Q1|Feb-Apr|08|Credit|ITA|PA|SBA|Campaign|7801
File2.txt... (7 Replies)
Discussion started by: i150371485
7 Replies
6. Shell Programming and Scripting
Hello everyone,
I think this would be easy for you experts.
Refering the suggestion that Scrutinizer gave me in this thread https://www.unix.com/302612499-post13.html
I have the script in this form
awk '{$1=$1}1' "$1" | awk ' ...'
Where "$1" takes the value of "inputfile" then I can... (1 Reply)
Discussion started by: Ophiuchus
1 Replies
7. Shell Programming and Scripting
Hi,
I had input file with below data,
abcdefghij;20100903040607;1234567891;GLOBAL;
Having values of fields with seperated by semi-colon (;) and ended with line feed (\n).
Through shell script, how can I check the field formatting?
Thanks in advance. (18 Replies)
Discussion started by: Poonamol
18 Replies
8. Shell Programming and Scripting
Hi Everyone,
Below is the script, i feel there should be more simple way to do the same output, my one works, but feel not nice. like using index i feel it is slow (image my file is very large), maybe awk can do one line code?
Please advice.
# cat 1.txt
1 a
2 b
3 cc
4 d
# cat 1.pl... (6 Replies)
Discussion started by: jimmy_y
6 Replies
9. Shell Programming and Scripting
Hi Everyone,
# cat a.txt
94,aqqc,62345907,
5,aeec,77,
# cat 1.pl
#!/usr/bin/perl
use strict;
use warnings;
use Date::Manip;
open(my $FA, "/root/a.txt") or die "$!";
while(<$FA>) {
chomp;
my @tmp=split(/\,/, $_);
if (index($tmp, "qq") ne -1) {
... (4 Replies)
Discussion started by: jimmy_y
4 Replies
10. UNIX for Dummies Questions & Answers
I am fairly new in unix I was wondering if anybody can help me out with this:
I am trying to output to a file the following fields;
Field1
Field2
Field4
From a database file dataBase1.
this is how the file looks:
dataBase1 TABLE DATA Example
==================
Table ... (3 Replies)
Discussion started by: Dennz
3 Replies