0
votes
1answer
20 views

Watch goes blank on refresh

I'm running the following command in watch. Works for the first one but subsequent ones go blank watch diff <(pacman -Q) <(ssh kate "pacman -Q")
2
votes
3answers
41 views

Colorize Bash Console Color

I need to be able to set my CentOS 6.4 bash prompt color to yellow. I've managed to find where to set this (.bashrc) and the ANSI color for yellow (\e[0;33m). I've setup my prompt as follows: ...
1
vote
3answers
67 views

string and number comparsion in bash in test statements?

I am not sure about this comparison i am doing: if [ "$exit_status" -eq 0 ];then #some statements fi is this correct way of comparing numbers or quotes make the variable exit_status a ...
0
votes
1answer
60 views

Multiple option arguments using getopts in bash

I am trying to process command line arguments using getopts in bash. One of the requirements is for the processing of an arbitrary number of option arguments (without the use of quotes). 1st example ...
8
votes
2answers
143 views

how to get exit status from the command before the last

I have solaris machine ( solaris 10 ) please Look on the following simple commands (haconf -makerw | grep -iq "Cluster already writable") # haconf -makerw VCS WARNING V-16-1-10364 Cluster ...
0
votes
0answers
26 views

How to mimic bash tab completion behavior on OS X when using Linux

I'm an OS X user who's used to ssh'ing into various Linux machines. Recently, I installed Ubuntu on one of our servers and have noticed very different tab completion behavior in bash. Among other ...
1
vote
2answers
37 views

What does the -c option of sg do?

What does the -c option of sg do? At least on my machine, the man page fails to explain this option.
-4
votes
1answer
92 views

zsh: Is it worth the switch from bash? Is it the time? [closed]

I have been a bash user for years now. However, I find that zsh is increasingly gaining momentum. I came up with the following questions: Is zsh really becoming that popular? Will it compete with ...
0
votes
1answer
37 views

Display ONLY IP addresses of currently logged users

I want to get a list of the currently logged users and their respective IP addresses. I tried the following command line: w -s However, the TTY, IDLE and WHAT columns are also displayed. I don't ...
-2
votes
0answers
44 views

Why rsh shows this behavior?

I am working with rsh. When I run rsh localhost ulimit -n , it shows 1024. But that should be 12000. Because ulimit -n gives 12000. But when I run service xinetd restart , it gives the hard limit ...
0
votes
1answer
80 views

Run expect script from other shell

My target is to create the /var/tmp/add_user.bash script from /var/tmp/create_script_add_user.bash script and run the expect script (add_user.bash) from create_script_add_user.bash script. The ...
0
votes
3answers
106 views

Regular Expression for finding double characters in Bash

I am looking for a regular expression that finds all occurences of double characters in a text, a listing, etc. on the command line (Bash). Main Question: Is there a simple way to look for sequences ...
1
vote
3answers
83 views

Sort with unequal whitespace in first column

I need to sort this list by name, high temp and low temp: Kuala Lumpur 78 56 Seoul 85 66 Karachi 95 75 Tokyo 85 60 Lahore 85 75 Manila 90 85 I figured since whitespace is the delimiter for a column ...
1
vote
2answers
109 views

Regular expression problem(s) in Bash: [^negate] doesn't seem to work

When I execute ls /directory | grep '[^term]' in Bash I get a regular listing, as if the grep command is ignored somehow. I tried the same thing with egrep, I tried to use it with double and single ...
0
votes
1answer
68 views

Must parse ls -Al output and get file or directory name [duplicate]

I must parse ls -Al output and get file or directory name ls -Al output : drwxr-xr-x 12 s162103 studs 12 march 28 2012 personal domain drwxr-xr-x 2 s162103 studs 3 march 28 ...

1 2 3 4 5 11
15 30 50 per page