- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: a small awk question (Newbie)
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-28-2002 11:10 PM
тАО08-28-2002 11:10 PM
i have 2 Files,
in File1 (find /etc/rc.config.d -type f -exec ls -l {} \; >file1)
are files without backslash,
in File2 (find /etc/rc.config.d -type f -exec ls -lb {} \; >file2)
are files with backslash.
How can i different interfacial the 2 files with awk to decide.
I need only the Files with \.
Thx.
regards
S.D.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-28-2002 11:21 PM
тАО08-28-2002 11:21 PM
Re: a small awk question (Newbie)
I might have misunderstood the question, but wouldn't "diff" give you the difference between the two files ?
Regards,
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-28-2002 11:30 PM
тАО08-28-2002 11:30 PM
Re: a small awk question (Newbie)
diff is not enough accurate.
diff file1 file2 =
# diff file1 file2
49c49
< -rw-rw-rw- 1 root sys 0 Aug 19 18:52 /etc/rc.config.d/
---
> -rw-rw-rw- 1 root sys 0 Aug 19 18:52 /etc/rc.config.d/\001
51c51,52
< -rw-rw-rw- 1 root sys 4137 Aug 27 08:58 /etc/rc.config.d/file1
---
> -rw-rw-rw- 1 root sys 4218 Aug 27 08:58 /etc/rc.config.d/file1
> -rw-rw-rw- 1 root sys 4221 Aug 27 08:58 /etc/rc.config.d/file2
I need only the the line with the File \001 the file has nonprintable charakters.
You understand my Question? :)
regards S??ren
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-28-2002 11:30 PM
тАО08-28-2002 11:30 PM
Re: a small awk question (Newbie)
To grep lines with \ in:
grep '\\' filename
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-28-2002 11:40 PM
тАО08-28-2002 11:40 PM
Re: a small awk question (Newbie)
thanks
S??ren
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-28-2002 11:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-28-2002 11:45 PM
тАО08-28-2002 11:45 PM
Re: a small awk question (Newbie)
Try comm
NAME
comm - select or reject lines common to two sorted files
SYNOPSIS
comm [-[123]] file1 file2
DESCRIPTION
comm reads file1 and file2, which should be ordered in increasing
collating sequence (see sort(1) and Environment Variables below), and
produces a three-column output:
Column 1: Lines that appear only in file1,
Column 2: Lines that appear only in file2,
Column 3: Lines that appear in both files.
Steve steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-30-2002 05:40 AM
тАО08-30-2002 05:40 AM
Re: a small awk question (Newbie)
find /etc/rc.config.d -type f -exec ls -lb {} \; | awk '$0~/\\/{print $0}'