GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Find out missing files
Operating System - HP-UX
1855933
Members
11947
Online
104107
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
- Integrity Servers
- Server Clustering
- HPE NonStop Compute
- HPE Apollo Systems
- High Performance Computing
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp Software
Knowledge Base
Discussions
Forums
Discussions
back
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
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
11-07-2003 08:36 PM
11-07-2003 08:36 PM
Hi,
I want to extract file name from log file, whenever there is no "#" character between two lines, the first line is starting with "Hash" and second line is the file name. Otherwise, if the hash is there that is transfered ok, and not required to get extracted. Portion of the log file is after this line:
-----------------------------------------------
Interactive mode off.
Hash mark printing on (1024 bytes/hash mark).
#
CDBHRBTALBVF00300
Tue Nov 4 08:01:55 WAT 2003
-----------------------------------------------
-----------------------------------------------
Interactive mode off.
Hash mark printing on (1024 bytes/hash mark).
CDBHRBTARETC02431
Tue Nov 4 08:31:40 WAT 2003
-----------------------------------------------
I want to extract file name from log file, whenever there is no "#" character between two lines, the first line is starting with "Hash" and second line is the file name. Otherwise, if the hash is there that is transfered ok, and not required to get extracted. Portion of the log file is after this line:
-----------------------------------------------
Interactive mode off.
Hash mark printing on (1024 bytes/hash mark).
#
CDBHRBTALBVF00300
Tue Nov 4 08:01:55 WAT 2003
-----------------------------------------------
-----------------------------------------------
Interactive mode off.
Hash mark printing on (1024 bytes/hash mark).
CDBHRBTARETC02431
Tue Nov 4 08:31:40 WAT 2003
-----------------------------------------------
Set goals, and work to achieve them
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2003 10:03 PM
11-07-2003 10:03 PM
Re: Find out missing files
hi
try the following:
val=0
while read -r line
do
if [ $val -eq 1 ]
then
echo $line >> filena
val=0
continue
else
echo $line | grep Ha
if [ $? -eq 0 ]
then
val=1
else
val=0
fi
fi
done < text.txt
echo " filename "
cat filename
try the following:
val=0
while read -r line
do
if [ $val -eq 1 ]
then
echo $line >> filena
val=0
continue
else
echo $line | grep Ha
if [ $? -eq 0 ]
then
val=1
else
val=0
fi
fi
done < text.txt
echo " filename "
cat filename
jj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2003 10:12 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2003 05:32 PM
11-08-2003 05:32 PM
Re: Find out missing files
Thank you friend, that is working.
Set goals, and work to achieve them
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP