- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- script skill
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
тАО04-25-2003 10:48 AM
тАО04-25-2003 10:48 AM
script skill
2. what is basename used for?
3. where is ".profile" place usually?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2003 12:41 PM
тАО04-25-2003 12:41 PM
Re: script skill
Hi,
1- Usually in Linux/UNIX we don't sepcify a file extension. The script is immediately saved with no extension. use ls -l for more details.
2- No info.
3- Under the home directory, example: /home/admin/.profile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2003 01:12 PM
тАО04-25-2003 01:12 PM
Re: script skill
1. If you are wondering if a variable containing a filename has an extension, here is one way to possibly get it using parameter expansion:
f=myfile.txt
b=${f##*.}
echo $b
txt
2. The basename function will take a filename with a path as an argument and will return the filename with all the directory path removed, something like this:
$ basename /somebig/dir/myfile.txt
myfile.txt
3. In your home directory.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2003 06:11 AM
тАО04-28-2003 06:11 AM
Re: script skill
#! /bin/ksh
Says use the k shell.
-Although, you don't necessarily need that, you can tell it to run with whatever interepreter you want by prefixing your script with the interepreter...
/bin/ksh script
-If you do include the interpreter in the top line (yes, it looks like a comment), you will need to change the script to be executable.
chmod + x script
(+x means add execuateble for all)
-Other answers given were fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2003 06:31 AM
тАО04-28-2003 06:31 AM
Re: script skill
Your questions were answered, but please spend time to provide points to the people who took some of their time to answer you back. This will encourage all to respond to you back in a good way.
thanks,
Umapathy