10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi All,
My requirement is this. Am trying to find a one liner unix command, which will check the last line of the file for 0. If it is zero, it would pick the previous line, else it should display the last line.
Eg:
abcd
efgh
ijhk
0
0
Output expected -- ijhk
Please share your... (8 Replies)
Discussion started by: hariniiyer300
8 Replies
2. Shell Programming and Scripting
Hello
For this future package for community, i'd like to know your preference on this presented 'issue'.
Writing some commands which will display some strings, using another command supporting 3 strings to be supplied, i wonder how the 'default output' should look like.
Let me use a... (2 Replies)
Discussion started by: sea
2 Replies
3. Shell Programming and Scripting
I am making a script that reads in the model of a car and then searches a file and displays the make model and price of anything matching the input provided. here is what I have so far
#!/bin/sh
echo Please enter a car model:
read model
if test $? -eq 0
then
grep $model /home/cars
awk... (4 Replies)
Discussion started by: subway69
4 Replies
4. Emergency UNIX and Linux Support
Hi,
I need a way to grab the total combines since inception, total pages read from webalizer on my centos server or any other location (as long as since inception) and display the result live on my website
So with each visit it would be increasing, or perhaps live (ajax) not sure
But can... (0 Replies)
Discussion started by: lawstudent
0 Replies
5. Shell Programming and Scripting
Hi Mates,
I require help in the following:
I have the following file snmp.txt
Wed Mar 2 16:02:39 SGT 2011
Class : mmTrapBladeS
origin : 10.0.0.0
hostname : 10.0.0.2
msg : IBM Blade Alert:
Calendar Index : 10.0.0.2-IBMBLADE
Fri Mar 4 07:10:54 SGT 2011
Class : mmTrapBladeS... (2 Replies)
Discussion started by: dbashyam
2 Replies
6. UNIX for Dummies Questions & Answers
I've seen articles which say "export DISPLAY=<IP>:0" and others which say "export DISPLAY=<IP>:0.0". Can someone explain what the difference is?
TIA (4 Replies)
Discussion started by: cjhancock
4 Replies
7. Shell Programming and Scripting
Can I use the read command to read the contents of a variable? I'm trying by using the following code and getting nothing back. I'm in a Linux environment.
#!/bin/ksh
IFS=~
VAR1=1~2~3~4
echo $VAR1 | read a b c d
print "$a $b $c $d" (9 Replies)
Discussion started by: nmalencia
9 Replies
8. UNIX for Dummies Questions & Answers
I'm trying to open an xwindow on my Sun server. What am I doing wrong?
# echo $SHELL
/sbin/sh
#
# export DISPLAY=localhost:0.0
DISPLAY=localhost:0.0: is not an identifier
Thank you! (1 Reply)
Discussion started by: FredSmith
1 Replies
9. 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
10. Cybersecurity
Hi:
Im trying to change the display setting from my Linux server to Linux workstation but a Refused connection by server appear.
The first task that I doing is to export the DISPLAY variable on my Linux Workstation so I tried to execute several X programs with the Refused Connection message.... (2 Replies)
Discussion started by: dansanmex
2 Replies