i want to search in the current directory all the files that contain one word for example "hello"
i want to achieve it with the grep command but not with the grep * (2 Replies)
Hi:
I'm not really a programmer, but I've created a small logout hook script to copy some specific directories to a server volume when a user logs out (10.6.4). These is a laptop user, so I'm looking find:
1) the command to check if the volume (including path to directory?) is available.
... (1 Reply)
Hi everyone,
when executing this command in unix:
echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error.
here is content of my script:
tdbsrvr$ vi hc.sh
"hc.sh" 22 lines, 509... (4 Replies)
Hi,
Not sure what the issue is here, but when i run the script. A simple copy command, it does not find the cp command ? See scrpt below :
#!/bin/sh
set -x
#############################################
# Backup Processes #... (4 Replies)
Hi,
I have run a lot of commands one after one,
but I can't run them simultaneous.
One command has to run and when finished second command has to run etc.
Also I would like to save all the outputs created by the commands in a file.
The commands can sometimes take hours, so it is also... (10 Replies)
hello
i have write a script which can create username + password
#!/bin/bash
# Script to add a user to Linux system
if ; then
read -p "Enter username : " username
read -s -p "Enter password : " password
egrep "^$username" /etc/passwd >/dev/null
if ; then... (3 Replies)
HI
I am trying to use the following code in the shell script (using grep)
usage()
{
echo "Usage: ./$0 <file name> <interval> <pattern>"
}
METRICS_FILE=$1
INTERVAL=$2
PATTERN="$3"
..
if
then
PATTERN="grep Gx"
fi
COUNT=`cat ${METRICS_FILE} | "${PATTERN}" |egrep... (8 Replies)
I am trying to find a way to run a command upon any movement of a mouse.
The 1st statement shows the mouse co-ordinates. So it can detect mouse movement.
xinput test 9
First list input devices:
$ xinput list
If possible, I would like to use it in a bash script. (2 Replies)
Hello,
I am running under ubuntu 14.04
Very long time ago, I set a script (ban.sh) to block ip addresses abusing my system which was not active.
I have not touched the server over six months or more.
Today, after restart the system, ban.sh started running all of a sudden and keep submitting... (4 Replies)