10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I am trying to run an awk command inside of ssh and it is not working. These are AIX servers.
for i in `cat servers`; do ssh $i "/bin/hostname; df -g | awk '/dev/ && $4+0 > 70'"; done
server1
server2
server3
server4
I also tried these two methods and they did not work. It just seemed... (5 Replies)
Discussion started by: cokedude
5 Replies
2. Shell Programming and Scripting
I have below command to check for error logs from last 24 hours from the file : /var/log/messages/ The command is working fine on the local host.
sudo awk -F - -vDT="$(date --date="24 hours ago" "+%b %_d %H:%M:%S")" ' DT < $1' /var/log/messages | egrep -i "error|fail"
I want to run the... (8 Replies)
Discussion started by: rahul2662
8 Replies
3. Shell Programming and Scripting
Dear folks
I have two data set which there names are "final.map" and "1.geno" and look like this structures:
final.map:
gi|358485511|ref|NC_006088.3| 2044
gi|358485511|ref|NC_006088.3| 2048
gi|358485511|ref|NC_006088.3| 2187
gi|358485511|ref|NC_006088.3| 17654
... (2 Replies)
Discussion started by: sajmar
2 Replies
4. Post Here to Contact Site Administrators and Moderators
Variable I have in my shell script
diff=$1$2.diff
id=$2
new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff | awk -F'~' ''$2 == "$id"' {print $0}' > $new
I could see value of $id is not passing to the awk... (0 Replies)
Discussion started by: Ashunayak
0 Replies
5. Shell Programming and Scripting
( sleep 3
echo ${LOGIN}
sleep 2
echo ${PSWD}
sleep 2
while read line
do
echo "$line"
PID=$?
sleep 2
kill -9 $PID
done < temp
sleep 5
echo "exit" ) | telnet ${HOST}
while is executing only command and exits. (5 Replies)
Discussion started by: sooda
5 Replies
6. Shell Programming and Scripting
Hello,
I am trying to create a ksh script to login to server and collect gather output of some command to troubleshoot some issue.
DATE=`date +%b.%d.%Y.%M.%H`
echo " Enter emp id to login to server"
read Eid
Eid=$Eid
echo " Enter hostname of the system"
read HOST
HOST=$HOST... (2 Replies)
Discussion started by: saurabh84g
2 Replies
7. Shell Programming and Scripting
Hi,
I have a separate file with a ksh function in it. When I try to run it, I get an error about permissions:
user@~/scripts/functions$ ksh f_fill_testfunc
ksh: f_fill_testfunc: cannot open
user@~/scripts/functions$ ls -l batch_functions/f_fill_testfunc
-rwxr-xr-x 1 user user 1105 Aug... (18 Replies)
Discussion started by: Subbeh
18 Replies
8. HP-UX
Hi All,
I want to get %cpu and %memory utilization for a given process id in HP-UX so am using the following commands
1)TOP -p <PID> am getting error message like Quitting top: pset 26323 doesn't exist,but when am using only TOP command without any options its working fine.
2)ps -e -o pcpu... (5 Replies)
Discussion started by: Ramya_Nm
5 Replies
9. Solaris
Hello.
I am trying to run xclock on newly built solaris box - These are the steps I followed:
# DISPLAY=localhost:0.0
# export DISPLAY
# xclock
xclock: not found
# cd /usr/openwin/bin
# ./xclock
Error: Can't open display: localhost:0.0
#
Please suggest, what am i doing wrong?
Thank... (27 Replies)
Discussion started by: panchpan
27 Replies
10. Shell Programming and Scripting
Hi,
Can u see the code below.
set xyz = `cat testt1.txt | awk '/-----/{\
print $1 }\
' | tail -1`
I need to execute it in c shell . What is wrong with the above command.
When i write everything on a single line then it is working.
Can anybody help me . (0 Replies)
Discussion started by: nani_g
0 Replies