- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- awk and shell problem
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
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
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-21-2009 05:36 PM
08-21-2009 05:36 PM
What does this do?
o awk -F':' '/^[Tt]he c.?[tw] jumps over the moon/{ print $1 }' ~/tmp/foo
In PERL what does this mean?
o $a->{‘foo’}
In ksh what does this do?
o myhost$ >/tmp/foo
Thanks in advance
i will really appreciate the help
Solved! Go to Solution.
- Tags:
- awk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2009 05:45 PM
08-21-2009 05:45 PM
Re: awk and shell problem
Firstly, your current ITRC status is
not flattering:
"I have assigned points to 63 of 132
responses to my questions."
If you want to show appreciation when others
take time to reply to your questions, at a
minimum you should assign points.
Secondly, these are classical school
assignment questions. If you ever
had a chance to log into any Unix and/or
Linux servers, why did not you try to run
these commands and see what they do.
Believe me, the answers are very
simple and even logical. Plus,
on-line manuals for awk, Shell and perl
would help immediately too.
ITRC forums should not be abused as each
of us have other serious jobs to do.
Cheers,
VK2COT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2009 02:37 AM
08-24-2009 02:37 AM
Solutionfor every line in $HOME/tmp/foo like
The c..t jumps over the moon :1234
it prints what is before ":"
-F : is for field separator definition
/^pattern/{action}
execute action for each line starting with the pattern
print $1 since we have -F : will display what is before :
In ksh what does this do?
o myhost$ >/tmp/foo
myhost$ is your prompt apparantly
so it trucate /tmp/foo
open /tmp/foo with create, truncate flag, and since there is nothing to execute on the line close it
so just a truncate
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2009 05:29 AM
08-24-2009 05:29 AM
Re: awk and shell problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2009 05:47 AM
08-24-2009 05:47 AM