<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: comparing files using awk in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-files-using-awk/m-p/2624884#M39608</link>
    <description>Hello,&lt;BR /&gt;&lt;BR /&gt;This script might help:&lt;BR /&gt;&lt;BR /&gt;echo | ls -l | grep -i $1&lt;BR /&gt;&lt;BR /&gt;If this script is named finder, then typing:&lt;BR /&gt;&lt;BR /&gt;finder &lt;WHAT you="" want="" to="" find=""&gt;&lt;BR /&gt;&lt;BR /&gt;should work for the current directory.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Vince&lt;/WHAT&gt;</description>
    <pubDate>Tue, 04 Dec 2001 15:39:50 GMT</pubDate>
    <dc:creator>Vincent Farrugia</dc:creator>
    <dc:date>2001-12-04T15:39:50Z</dc:date>
    <item>
      <title>comparing files using awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-files-using-awk/m-p/2624879#M39603</link>
      <description>Hi, &lt;BR /&gt;&lt;BR /&gt;I'm not a script guy and I'm currently in a situation which is, I need someone who could help me create a simple (for the experts) awk script that will compare system files against users input. &lt;BR /&gt;&lt;BR /&gt;  ex. - users entered "SAMPLE.TXT" (usually &lt;BR /&gt;        upper case) &lt;BR /&gt;      - systems could have "Sample.txt" &lt;BR /&gt;                        or "sample.txt" &lt;BR /&gt;                        or "sample.TXT" &lt;BR /&gt;&lt;BR /&gt;regardless whatever the system has. Script should match users input against files in the system and proceed it's process. BTW, this is to ftp a file from one machine to another. &lt;BR /&gt;&lt;BR /&gt;Your reply would be greatly appreciated. &lt;BR /&gt;Thanks &lt;BR /&gt;Joey</description>
      <pubDate>Tue, 04 Dec 2001 15:16:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-files-using-awk/m-p/2624879#M39603</guid>
      <dc:creator>Kurtkarl</dc:creator>
      <dc:date>2001-12-04T15:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: comparing files using awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-files-using-awk/m-p/2624880#M39604</link>
      <description>One easy way is to use grep -i file_name&lt;BR /&gt;This will ignore case and pick up files.&lt;BR /&gt;&lt;BR /&gt;For ex.,&lt;BR /&gt;&lt;BR /&gt;DIR=/some_path&lt;BR /&gt;echo "Enter your file name:"&lt;BR /&gt;read file&lt;BR /&gt;ll $DIR |grep -i $file&lt;BR /&gt;if [ $? = 0 ]&lt;BR /&gt;then&lt;BR /&gt;echo $file is there&lt;BR /&gt;else&lt;BR /&gt;echo $file doesnot exist&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;It will become little bit complicated if you use the path names.&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Tue, 04 Dec 2001 15:25:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-files-using-awk/m-p/2624880#M39604</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2001-12-04T15:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: comparing files using awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-files-using-awk/m-p/2624881#M39605</link>
      <description>awk ' $0~/[S-s][A-a][M-m][P-p][L-l][E-e]/ ' filename&lt;BR /&gt;&lt;BR /&gt;This will find any way the word sample was spelled in the filename searched.</description>
      <pubDate>Tue, 04 Dec 2001 15:26:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-files-using-awk/m-p/2624881#M39605</guid>
      <dc:creator>Krishna Prasad</dc:creator>
      <dc:date>2001-12-04T15:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: comparing files using awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-files-using-awk/m-p/2624882#M39606</link>
      <description>One suggestion, use the toupper or tolower built-in funtions in awk to consider both character cases. &lt;BR /&gt;&lt;BR /&gt;Tony</description>
      <pubDate>Tue, 04 Dec 2001 15:28:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-files-using-awk/m-p/2624882#M39606</guid>
      <dc:creator>Anthony deRito</dc:creator>
      <dc:date>2001-12-04T15:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: comparing files using awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-files-using-awk/m-p/2624883#M39607</link>
      <description>Hi Joey, &lt;BR /&gt;&lt;BR /&gt;This may not be what you want, and it doesn't use awk, but it'll find all files under a directory, regardless of case, that match the user's input: &lt;BR /&gt;&lt;BR /&gt;================================ &lt;BR /&gt;#!/bin/ksh &lt;BR /&gt;&lt;BR /&gt;DIR=search-directory &lt;BR /&gt;&lt;BR /&gt;echo Enter filename: '\c' &lt;BR /&gt;read FILENAME &lt;BR /&gt;&lt;BR /&gt;find $DIR -type f | grep -i "/${FILENAME}$" &lt;BR /&gt;================================== &lt;BR /&gt;&lt;BR /&gt;Obviously, you need to edit the "DIR=" line. &lt;BR /&gt;&lt;BR /&gt;Rgds, Robin. (duplicate of reply in 1st post!)</description>
      <pubDate>Tue, 04 Dec 2001 15:30:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-files-using-awk/m-p/2624883#M39607</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2001-12-04T15:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: comparing files using awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-files-using-awk/m-p/2624884#M39608</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;This script might help:&lt;BR /&gt;&lt;BR /&gt;echo | ls -l | grep -i $1&lt;BR /&gt;&lt;BR /&gt;If this script is named finder, then typing:&lt;BR /&gt;&lt;BR /&gt;finder &lt;WHAT you="" want="" to="" find=""&gt;&lt;BR /&gt;&lt;BR /&gt;should work for the current directory.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Vince&lt;/WHAT&gt;</description>
      <pubDate>Tue, 04 Dec 2001 15:39:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-files-using-awk/m-p/2624884#M39608</guid>
      <dc:creator>Vincent Farrugia</dc:creator>
      <dc:date>2001-12-04T15:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: comparing files using awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-files-using-awk/m-p/2624885#M39609</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;if [ "$#" -ne 2 ]&lt;BR /&gt;then&lt;BR /&gt;echo "USAGE=script_name DIR_NAME FILE_NAME"&lt;BR /&gt;exit 1&lt;BR /&gt;fi&lt;BR /&gt;DIRNAME=$1&lt;BR /&gt;FILENAME=$2&lt;BR /&gt;for i in `find $DIRNAME -depth`&lt;BR /&gt;do&lt;BR /&gt;TEST=`echo $i | grep -v -i $FILENAME`&lt;BR /&gt;if [ "$TEST" -eq "" ]&lt;BR /&gt;then&lt;BR /&gt;echo $i&lt;BR /&gt;fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this will help,&lt;BR /&gt;&lt;BR /&gt;Gideon&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Dec 2001 16:23:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-files-using-awk/m-p/2624885#M39609</guid>
      <dc:creator>G. Vrijhoeven</dc:creator>
      <dc:date>2001-12-04T16:23:09Z</dc:date>
    </item>
  </channel>
</rss>

