Search of multiple numeric entries in an output file
Hello Tech Guys,
I have two files named check.txt and output.txt
Content of check.txt
Content of output.txt
The output.txt contains the search of two numeric data numbers i.e. 40201800027285 and 02711306140261 (could be more than two). Against each of these two numeric values the system provided the total number of locked items (could be more). Now I need to compare these locked items alongwith the items present in search.txt in 1st coloum and need to know the difference. The desired output after comparing these two files will be saved in difference.txt and should be like below:
Kindly suggest a code for the above described requirement. Efforts will be really appreciable.
Thanks.
Last edited by vgersh99; 04-25-2019 at 06:36 PM..
Reason: added code tags to the ouput
if $1 = "123x456", how can I test for the non-numeric character 'x' in that string. I've tried expr with "" but it did not find the x. Any ideas? Can this perhaps be done with sed?
Thanks. (2 Replies)
Variations of multiple renames seems to come up a lot but i can't find the answer to this situation.
Tidying up a directory where people rename files to .working, .bob, .attempt1 & so on.
what i am trying to do is: list the file type, & rename from ".whatever" to .fixed.
As the ".whatever" is... (5 Replies)
Hi
I am very new to linux and scripting.
I need to replace numbers abc with number xyz inputting from a reference file.
I used the following command -
sed "s/$grd/$lab/" , where $grd and $lab comes from reference file.
The problem is the above line doesnt take care of space..... (1 Reply)
Hi All,
I would like to convert my below csh script to Perl.
Can any expert help ?
# To check for numeric input
set tested1 = `echo "$tested"| awk '/^+$/'`;
# To remove un-neccessary zeros
set tested2 = `echo "$tested"|awk '{print $0+0}'`; (3 Replies)
During a file-system cleanup I noticed a strange behavior of awk (HP-UX 11iv3 / IA64). When summing up the size of files in one directory it gives different numbers when using print as opposed to printf:
find . -type f -name '*.dmp.Z' -mtime +35 -exec ls -l {} \+ | \
awk 'BEGIN{ OFMT="%f" } {... (1 Reply)
Hi all,
I'm trying to implement a linear congruential pseudorandom number generator (<http://en.wikipedia.org/wiki/Linear_congruential_generator>), since $RANDOM and /dev/random aren't standardized. I'm referring to the Shell & Utilities volume of POSIX.1-2008, but I'm running into some odd... (3 Replies)
Hi All,
I am new here but I have a scripting question that I can't seem to figure out with the "find" cmd.
What I am trying to do is to only have to run a single find cmd parsing the directories and output the different file types to induvidual files and I have been running into problems.... (3 Replies)
Hi,
I want to grep multiple patterns from multiple files and save to multiple outputs. As of now its outputting all to the same file when I use this command.
Input : 108 files to check for 390 patterns to check for. output I need to 108 files with the searched patterns.
Xargs -I {} grep... (3 Replies)
I'm trying to find a way to search a range of similar words in a file. I tried using sed but can't get it right:sed 's/\(ca01\)*//'It only removes "ca01" but leaves the rest of the word. I still want the rest of the information on the lines just not these specific words listed below. Any... (3 Replies)
Hi guys,
I have a text file named file1.txt that is formatted like this:
001 , ID , 20000
002 , Name , Brandon
003 , Phone_Number , 616-234-1999
004 , SSNumber , 234-23-234
005 , Model , Toyota
007 , Engine ,V8
008 , GPS , OFF
and I have file2.txt formatted like this:
... (2 Replies)
Discussion started by: An0mander
2 Replies
LEARN ABOUT OPENSOLARIS
ps2ascii
PS2ASCII(1) Ghostscript Tools PS2ASCII(1)NAME
ps2ascii - Ghostscript translator from PostScript or PDF to ASCII
SYNOPSIS
ps2ascii [ input.ps [ output.txt ] ]
ps2ascii input.pdf [ output.txt ]
DESCRIPTION
ps2ascii uses gs(1) to extract ASCII text from PostScript(tm) or Adobe Portable Document Format (PDF) files. If no files are specified on
the command line, gs reads from standard input; but PDF input must come from an explicitly-named file, not standard input. If no output
file is specified, the ASCII text is written to standard output.
ps2ascii doesn't look at font encoding, and isn't very good at dealing with kerning, so for PostScript (but not currently PDF), you might
consider pstotext (see below).
FILES
Run "gs -h" to find the location of Ghostscript documentation on your system, from which you can get more details.
SEE ALSO pstotext(1), http://www.research.digital.com/SRC/virtualpaper/pstotext.html
VERSION
This document was last revised for Ghostscript version 8.63.
AUTHOR
Artifex Software, Inc. are the primary maintainers of Ghostscript. David M. Jones <dmjones@theory.lcs.mit.edu> made substantial improve-
ments to ps2ascii.
8.63 1 August 2008 PS2ASCII(1)