Useless use of '-u', redirection, a pipe, and cat. Wow. Just wow. Same can be done by running
since a list of RPMs probably won't have any unnecessary doubles in it.
Thanks for the response...Now i have a requirement something like this. I have a script as below:
#!/bin/bash -vx
##VARIABLES used below are defined in my profile and am importing them before i use them
rm -f list.log
#Extract the RPMs from RPM Database on each of the server
for i in $SERVER; do
echo -n "$i" >> list.log
echo "" >> list.log
ssh $i 'rpm -qa | grep '$CURRENT_VER' ' >> list.log
done
#Extract Info from the Delivery Server
rm -f $DELIVERY_LOG
for j in $WEBDAV_SERVER; do
echo $DELIVER_DIR
ssh <user_name>@$j 'find '$DELIVER_DIR' -type f -name "vst3*.rpm" -printf %f\\n ' >> $DELIVERY_LOG
done
# Compare the files delivery and list two get the difference.
Now here is what i am facing the problem.
1. I need to sort the $DELIVERY_LOG taking only higher version of the RPM and make it $FINAL_LOG
2. I need to compare $FINAL_LOG with the list.log and i should get the output as below
the RPM in $FINAL_LOG is missing on the server *$i
Will i have to create a property file which has which all RPMs are present on each server first? or is there any other method
Dear All,
Good day. Here i am facing some problem like below.
file contains
12345 0001 090112
14385 0001 090112
13255 0001 090112
11345 0001 090112
....
I want to sort ascending according to the first column. What will be the shell script. (4 Replies)
I have a file below which has a list of users and roles with each row having unique combination of users and roles.
USER1 ROLE1
USER1 ROLE2
USER2
USER3 ROLE1
USER3 ROLE2
USER3 ROLE3
USER4 ROLE2
....
....
I am trying to create a script which sorts the above file to have all the... (4 Replies)
Hi to all.
I'm trying to sort this with the Unix command sort.
user1:12345678:3.5:2.5:8:1:2:3
user2:12345679:4.5:3.5:8:1:3:2
user3:12345687:5.5:2.5:6:1:3:2
user4:12345670:5.5:2.5:5:3:2:1
user5:12345671:2.5:5.5:7:2:3:1
I need to get this:
user3:12345687:5.5:2.5:6:1:3:2... (7 Replies)
Hello all -
I am to this forum and fairly new in learning unix and finding some difficulty in preparing a small shell script. I am trying to make script to sort all the files given by user as input (either the exact full name of the file or say the files matching the criteria like all files... (3 Replies)
Need to sort a portion of a file in a Alphabetical Order.
Example : The user adam is not sorted and the user should get sorted. I don't want the complete file to get sorted.
Currently All_users.txt contains the following lines.
##############
# ARS USERS
##############
mike, Mike... (6 Replies)
Input file:
100%ABC2 3.44E-12 USA
A2M%H02579 0E0 UK
100%ABC2 5.34E-8 UK
100%ABC2 3.25E-12 USA
A2M%H02579 5E-45 UK
Output file:
100%ABC2 3.44E-12 USA
100%ABC2 3.25E-12 USA
100%ABC2 5.34E-8 UK
A2M%H02579 0E0 UK
A2M%H02579 5E-45 UK
Code try:
sort -k1,1 -g -k2 -r input.txt... (2 Replies)
Hi Experts,
I have a filelist collected from another server , now want to sort the output using date/time stamp filed.
- Filed 6, 7,8 are showing the date/time/stamp.
Here is the input:
#----------------------------------------------------------------------
-rw------- 1 root ... (3 Replies)
as friends can only Sort this file with awk from low to high from position 3 to 9 bone this:
0003344
A70003344prueba1
A70003347prueba1
A70003345prueba1
A70003349prueba1
A70003343prueba1
A70003342prueba1 (4 Replies)