![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| print 10 characters in series | cdfd123 | Shell Programming and Scripting | 1 | 04-28-2008 01:18 AM |
| Print the characters in a word | chella | Shell Programming and Scripting | 5 | 10-17-2007 10:06 AM |
| How to ignore characters and print only number using unix? | cdfd123 | UNIX for Dummies Questions & Answers | 5 | 08-03-2007 04:47 AM |
| Solaris - unknown hostname - how can I change hostname? | XNOR | UNIX for Dummies Questions & Answers | 1 | 03-29-2007 11:52 PM |
| AIX cannot print thai characters | ivanwee | AIX | 0 | 10-18-2006 04:13 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Print the first four characters of hostname
Hey,
I'm trying to print the first four characters of the hostname of a computer. I can get it from using: hostname -s | sed 's/...........$//'" but this is when I know how many characters are in the computer name. I dont understand why some like: hostname -s | sed '/..../p' wont work? Any ideas? Thanks. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|