Sponsored Content
Full Discussion: Text not present in file
Top Forums UNIX for Beginners Questions & Answers Text not present in file Post 303000230 by RudiC on Thursday 6th of July 2017 05:45:01 PM
Old 07-06-2017
What did you do to spot the error? Did you download the files in post#1 and run the code against them? did you check for control chars?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ls > file - Creating file containing the list of all files present in a directory

Hi All, I need to create a file which contains the list of all the files present in that directory. e.g., ls /export/home/user/*.dat > list_file.dat but what i am getting is: $ ls /export/home/user/*.dat > list_file.dat /export/home/user/*.dat: No such file or directory But I have... (1 Reply)
Discussion started by: pranavagarwal
1 Replies

2. Shell Programming and Scripting

Help needed in extracting text present between two headers in .txt file

Hi All, Please help me out in fllowing problem. I have text file which contains the data in following format. Contents of file.txt are setregid02 Test that setregid() fails and sets the proper errno values when a non-root user attemps to change the real or effective... (2 Replies)
Discussion started by: varshit
2 Replies

3. Shell Programming and Scripting

How to Check whether list file present in TXT file exist or not

Hi All, I have txt file which has list of files. I have to check whether these files exist or not. Thanks supriya (6 Replies)
Discussion started by: supriyabv
6 Replies

4. Shell Programming and Scripting

Delete a pattern present in file 2 from file 1 if found in file 1.

I have two files File1 ==== 1|2000-00-00|2010-02-02|| 2| 00:00:00|2012-02-24|| 3|2000-00-00|2011-02-02|| File2 ==== 2000-00-00 00:00:00 I want the delete the patterns which are found in file 2 from file 1, Expected output: File1 ==== (5 Replies)
Discussion started by: machomaddy
5 Replies

5. Shell Programming and Scripting

Need unix commands to delete records from one file if the same record present in another file...

Need unix commands to delete records from one file if the same record present in another file... just like join ... if the record present in both files.. delete from first file or delete the particular record and write the unmatched records to new file.. tried with grep and while... (6 Replies)
Discussion started by: msathees
6 Replies

6. Shell Programming and Scripting

Use sed to append text to filenames if text not already present

I have some html with hrefs that contain local links to pdf filenames. These filenames should have standardised names, i.e. there should be a label prior to the ".pdf" filename suffix. There can be many of these links on a single line of text and some may already have the label. For example ... (13 Replies)
Discussion started by: adb
13 Replies

7. Shell Programming and Scripting

Speed : awk command to count the occurrences of fields from one file present in the other file

Hi, file1.txt AAA BBB CCC DDD file2.txt abc|AAA|AAAabcbcs|fnwufnq bca|nwruqf|AAA|fwfwwefwef fmimwe|BBB|fnqwufw|wufbqw wcdbi|CCC|wefnwin|wfwwf DDD|wabvfav|wqef|fwbwqfwfe i need the count of rows of file1.txt present in the file2.txt required output: AAA 2 (10 Replies)
Discussion started by: mdkm
10 Replies

8. Shell Programming and Scripting

Systemd errors of missing file “No such file or directory” inspite of file being present

The contents of my service file srvtemplate-data-i4-s1.conf is Description=test service for users After=network.target local-fs.target Type=forking RemainAfterExit=no PIDFile=/data/i4/srvt.pid LimitCORE=infinity EnvironmentFile=%I . . . WantedBy=multi-user.target (0 Replies)
Discussion started by: rupeshkp728
0 Replies

9. UNIX for Beginners Questions & Answers

UNIX script to append multiple text files into one file based on pattern present in filaname

Hi All-I am new to Unix , I need to write a script. Can someone help me with a requirement where I have list of files in a directory, I want to Merge the files if a pattern of string matches in filenames? AAAL_555A_ORANGE1_F190404.TXT AAAL_555A_ORANGE2_F190404.TXT AAAL_555A_ORANGE3_F190404.TXT... (6 Replies)
Discussion started by: Shankar455
6 Replies

10. UNIX for Beginners Questions & Answers

awk code to find difference in second file which is not present in first file .

Hi All, I want to find difference between two files and output only lines which are not present in second file .I am using awk and I am getting only the first difference but I want to get all the lines which are not present in file2 .Below is the code I am using . Please help to get the desired... (7 Replies)
Discussion started by: srinivasrao
7 Replies
Text::Diff::Table(3)					User Contributed Perl Documentation				      Text::Diff::Table(3)

NAME
Text::Diff::Table - Text::Diff plugin to generate "table" format output SYNOPSIS
use Text::Diff; diff @a, $b { STYLE => "Table" }; DESCRIPTION
This is a plugin output formatter for Text::Diff that generates "table" style diffs: +--+----------------------------------+--+------------------------------+ | |../Test-Differences-0.2/MANIFEST | |../Test-Differences/MANIFEST | | |Thu Dec 13 15:38:49 2001 | |Sat Dec 15 02:09:44 2001 | +--+----------------------------------+--+------------------------------+ | | * 1|Changes * | 1|Differences.pm | 2|Differences.pm | | 2|MANIFEST | 3|MANIFEST | | | * 4|MANIFEST.SKIP * | 3|Makefile.PL | 5|Makefile.PL | | | * 6|t/00escape.t * | 4|t/00flatten.t | 7|t/00flatten.t | | 5|t/01text_vs_data.t | 8|t/01text_vs_data.t | | 6|t/10test.t | 9|t/10test.t | +--+----------------------------------+--+------------------------------+ This format also goes to some pains to highlight "invisible" characters on differing elements by selectively escaping whitespace. Each element is split in to three segments (leading whitespace, body, trailing whitespace). If whitespace differs in a segement, that segment is whitespace escaped. Here is an example of the selective whitespace. +--+--------------------------+--------------------------+ | |demo_ws_A.txt |demo_ws_B.txt | | |Fri Dec 21 08:36:32 2001 |Fri Dec 21 08:36:50 2001 | +--+--------------------------+--------------------------+ | 1|identical |identical | * 2| spaced in | also spaced in * * 3|embedded space |embedded tab * | 4|identical |identical | * 5| spaced in | tabbed in * * 6|trailing spacesss |trailing tabs * | 7|identical |identical | * 8|lf line |crlf line * * 9|embedded ws |embedded ws * +--+--------------------------+--------------------------+ Here's why the lines do or do not have whitespace escaped: lines 1, 4, 7 don't differ, no need. lines 2, 3 differ in non-whitespace, no need. lines 5, 6, 8, 9 all have subtle ws changes. Whether or not line 3 should have that tab character escaped is a judgement call; so far I'm choosing not to. UNICODE
To output the raw unicode chracters consult the documentation of Text::Diff::Config. You can set the "DIFF_OUTPUT_UNICODE" environment variable to 1 to output it from the command line. For more information, consult this bug: <https://rt.cpan.org/Ticket/Display.html?id=54214> . LIMITATIONS
Table formatting requires buffering the entire diff in memory in order to calculate column widths. This format should only be used for smaller diffs. Assumes tab stops every 8 characters, as $DIETY intended. Assumes all character codes >= 127 need to be escaped as hex codes, ie that the user's terminal is ASCII, and not even "high bit ASCII", capable. This can be made an option when the need arises. Assumes that control codes (character codes 0..31) that don't have slash-letter escapes (" ", " ", etc) in Perl are best presented as hex escapes ("x01") instead of octal ("01") or control-code ("cA") escapes. AUTHOR
Barrie Slaymaker <barries@slaysys.com> LICENSE
Copyright 2001 Barrie Slaymaker, All Rights Reserved. You may use this software under the terms of the GNU public license, any version, or the Artistic license. perl v5.16.3 2011-04-17 Text::Diff::Table(3)
All times are GMT -4. The time now is 04:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy