- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How can i create an script ?
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
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
тАО02-03-2003 06:30 AM
тАО02-03-2003 06:30 AM
while true
do
dd if= of=
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2003 06:33 AM
тАО02-03-2003 06:33 AM
Re: How can i create an script ?
vi scriptname.
Include a shell at the top such as
#!/usr/bin/sh
or
#!/usr/bin/ksh
copy in your text.
Shift ZZ to save it
chmod a+x scriptname
Now it is excecutable by all.
Then test it.
P
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2003 06:49 AM
тАО02-03-2003 06:49 AM
SolutionHi Martin,
Create a script is a simple task. A script is a text file that "glue" the unix command lines in a program block.
To create one with your information do the following:
1- Call the vi editor:
# vi scriptname
If you don??t know vi is better to do a:
# man vi
2- Use a header in the first line
#!/bin/sh
Check if this path exist !
3- Copy the text that you have and after finnish the command block with
exit 0;
4- Save the script and give execute permissions:
# chmod +x scriptname
5- To do a debug do:
# sh -x scriptname
Regards,
Ricardo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2003 07:11 AM
тАО02-03-2003 07:11 AM
Re: How can i create an script ?
If you'd rather not "vi" it, you can simply type:
cat <<'EOF' > yourscriptname
while true
do
dd if= of=
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2003 07:14 AM
тАО02-03-2003 07:14 AM
Re: How can i create an script ?
If you want to use forms like "if" of " for " you have to begin your script with #!/usr/bin/ksh
To indicate the shell you want to use.
There arr a lot of information about shell script in internet where you can find examples and more.
I hope to this help you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2003 07:20 AM
тАО02-03-2003 07:20 AM
Re: How can i create an script ?
In addition to all you must:
1.Find the device file of tape1-drive
and tape2-drive,
usually in dir /dev/rmt and
put these files nstead of
and
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2003 07:23 AM
тАО02-03-2003 07:23 AM
Re: How can i create an script ?
The how has been well covered .
1)here are a good list of examples for further use
http://www.introcomp.co.uk/hpux/index.html
2)The online doc
http://www.docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90164/B2355-90164_top.html&con=/hpux/onlinedocs/B2355-90164/00/00/36-con.html&toc=/hpux/onlinedocs/B2355-90164/00/00/36-toc.html&searchterms=shell%7cprogramming&queryid=20030203-075857
explains more about shells
3)here is more unix info
http://www.ee.byu.edu/support/computer_tutorial/unixindex.html
steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2003 07:31 AM
тАО02-03-2003 07:31 AM