03-16-2012
Clues:
Using only ls how do you list only directories?
what are . (dot) ..( 2dots)?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a variable that is outputting a lot of space.
here has been 45 lines returned ...
how can I remove the spaces between the "been and the 45"
CODE:
fil_len=`wc -l < coshb.txt`
if ; then
cat coshb.txt | more
echo " "
echo "There has been ${fil_len} lines... (4 Replies)
Discussion started by: jagannatha
4 Replies
2. Shell Programming and Scripting
whats the value stored in $$ (2 Replies)
Discussion started by: suri
2 Replies
3. UNIX for Dummies Questions & Answers
are there any basic commands that can display lines 99 - 101 of the /etc/passwd file?
I'm thinking use of head and tail, but I forget what numbers to use and where to put /etc/passwd in the command. (2 Replies)
Discussion started by: raidkridley
2 Replies
4. Shell Programming and Scripting
Dear Friends,
I have my command output which displays on one row and values are now scrollable (vertical) 3 pages. How do i display those output in three column so that i no need to scroll?
Example:
dcadd$cat components
1.Caluculator
2.Diary
...
...
50.Mobile
51.Battery
..
...... (12 Replies)
Discussion started by: baluchen
12 Replies
5. Shell Programming and Scripting
Hi
I am facing a strange problem
a=03
echo ${a}
the output is 3
But i want to display it is 03
Can you people help me how to display it like 03.
Thanks (2 Replies)
Discussion started by: aishsimplesweet
2 Replies
6. Shell Programming and Scripting
This is Input - starts with Storage Group Name and ends with Shareable and the loop continues all I need is Storage group name and Alu numbers in the below output format requested.
Storage Group Name: abcd
Storage Group UID: 00:00:000:00:0:0:0
HBA/SP Pairs:
HBA UID ... (6 Replies)
Discussion started by: maddysa
6 Replies
7. UNIX and Linux Applications
Hi,
I'm trying to figure out a way to find which line in my file.txt with IP addresses:
192.168.0.1
192.178.0.2
etc...
returns specific result when I execute command affecting all lines.
For example when I run:
for line in `cat file.txt`;
do
snmpget $line
done
it displays the... (5 Replies)
Discussion started by: svetoslav_sj
5 Replies
8. Shell Programming and Scripting
lets say I am printing something out
echo "Please enter a valid username"
and its being printed out 5 times, is there any way I can limit to only being displayed ONCE. I tried echo -n but that just makes everything fit on one line.
Right now it keeps saying
Please enter a valid... (5 Replies)
Discussion started by: subway69
5 Replies
9. UNIX for Dummies Questions & Answers
This could be a really dummy question.
I have a log text file.
What unix command to extract line from specific string to another specific string.
Is it something similar to?:
more +/"string" file_name
Thanks (4 Replies)
Discussion started by: aku
4 Replies
10. Shell Programming and Scripting
I pass a number to my script. Passing "1" below.
./getfile.sh 1
echo "User entered: $1"
ls -ltr *.conf | sed -n '$p'
I wish to use ls -ltr i.e list files in ascending order of time the latest showing at the bottom of the output.
Number 1 should get me the last row of ls -ltr output i.e... (9 Replies)
Discussion started by: mohtashims
9 Replies
LEARN ABOUT OSF1
hostname
hostname(5) File Formats Manual hostname(5)
NAME
hostname - Host name resolution description
DESCRIPTION
Host names are domains, where a domain is a hierarchical, dot-separated list of subdomains; for example, the machine monet, in the Berkeley
subdomain of the EDU subdomain of the Internet would be represented as follows: monet.Berkeley.EDU
Notice that there is no trailing dot.
Host names are often used with network client and server programs, which must generally translate the name to an address for use. (This
function is generally performed by the gethostbyname() function.) Host names are resolved by the Internet name resolver in the following
fashion.
If the name consists of a single component (that is, contains no dot), and if the HOSTALIASES environment variable is set to the name of a
file, that file is searched for a string matching the input host name. The file should consist of lines made up of two white-space sepa-
rated strings, the first of which is the host name alias, and the second of which is the complete host name to be substituted for that
alias. If a case-insensitive match is found between the host name to be resolved and the first field of a line in the file, the substi-
tuted name is looked up with no further processing.
If the input name ends with a trailing dot, the trailing dot is removed, and the remaining name is looked up with no further processing.
If the input name does not end with a trailing dot, it is looked up by searching through a list of domains until a match is found. The
default search list includes first the local domain, then its parent domains with at least 2 name components (longest first). For example,
in the domain CS.Berkeley.EDU, the name lithium.CChem will be checked first as lithium.CChem.CS.Berkeley.EDU and then as
lithium.CChem.Berkeley.EDU. Lithium.CChem.EDU will not be tried, as there is only one component remaining from the local domain. The search
path can be changed from the default by a system-wide configuration file.
SEE ALSO
Functions: gethostbyname(3)
Commands: named(8)
hostname(5)