- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: While loop to produce file of invalid user nam...
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
Forums
Discussions
Discussions
Discussions
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
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
04-12-2005 01:39 AM
04-12-2005 01:39 AM
Please see the following section of shell script:
/usr/sbin/acct/fwtmp < /var/adm/btmp > /tmp/bad_logins
while read line
do
awk '{print $1}' >> /tmp/bad_login_names
done < /tmp/bad_logins
The first part is creating the file /tmp/bad_logins without any problem but the second part does not put anything into /tmp/bad_login_names.
Any ideas what could be wrong?
Mark Syder (like the drink but spelt different)
Solved! Go to Solution.
- Tags:
- fwtmp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2005 01:41 AM
- Tags:
- awk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2005 01:52 AM
04-12-2005 01:52 AM
Re: While loop to produce file of invalid user names
The script should look like that:
usr/sbin/acct/fwtmp < /var/adm/btmp > /tmp/bad_logins
awk '{print $1}' /tmp/bad_logins >> /tmp/bad_login_names
or
usr/sbin/acct/fwtmp < /var/adm/btmp |
awk '{print $1}'>> /tmp/bad_login_names
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2005 01:59 AM
04-12-2005 01:59 AM
Re: While loop to produce file of invalid user names
your awk step has no input to process !!
put an
echo $line |
in front of the awk and it should work.
Or use the other solutions given or use cut.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2005 02:03 AM
04-12-2005 02:03 AM
Re: While loop to produce file of invalid user names
Thanks for the help.
Mark