11-19-2009
Hi patrick,
i have tried your scenario, pelase find the script and its working for your scenario.
t1 - File_1
t2 - File_2
script:
$more t3.sh
#!/bin/bash
exec<t1
while read line
do
tes=`grep -w $line t2`
if [ -z "$tes" ]
then
echo "$line"
else
echo "$tes"
fi
done
-------------------
o/p
$sh t3.sh
2000_t Ali england 135
g1110.b1
abb.1 Zoe british 150
2001_t Ali england 305
g1111.b1 Lucy russia 126
abb.2 Zoe british 500
g1112.b1 Lucy russia 180
abb.3 Zoe british 700
2002_t
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Input
#GEO-1-type-1-fwd-Initial 890 1519
OPKHIJEFVTEFVHIJEFVOPKHIJTOPKEFVHIJTEFVOPKOPKHIJHIJHIJTTOPKHIJHIJEFVEFVOPKHIJOPKHIJOPKEFVEFVOPKHIJHIJEFVHIJHIJEFVTHIJOPKOPKTEFVEFVEFVOPKHIJOPKOPKHIJTTEFVEFVTEFV
#GEO-1-type-2-fwd-Terminal 1572 2030... (7 Replies)
Discussion started by: patrick87
7 Replies
2. Shell Programming and Scripting
Input file_1:
P78811
P40108
O17861
Q6NTW1
P40986
Q6PBK1
P38264
Q6PBK1
Q9CZ49
Q1GZI0
Input file_2: (6 Replies)
Discussion started by: patrick87
6 Replies
3. Shell Programming and Scripting
Hello,
I have searched forum trying to find a solution to my problem, but could not find anything or I did not understand the examples....
I should say, I am very inexperienced with text processing.
I have a text file with approx 60k lines in it.
I need to merge lines based on the number... (8 Replies)
Discussion started by: Bertik
8 Replies
4. Shell Programming and Scripting
Hi
i have a file which have a pattern like this
Nov 10 session closed
Nov 10 Nov 9 08:14:27 EST5EDT 2010 on tty .
Nov 10 Oct 19 02:14:21 EST5EDT 2010 on pts/tk .
Nov 10 afrtetryytr
Nov 10 session closed
Nov 10 Nov 10 03:21:04 EST5EDT 2010
Dec 8 Nov 10 05:03:02 EST5EDT 2010
... (13 Replies)
Discussion started by: Himanshu_soni
13 Replies
5. Shell Programming and Scripting
Input file
data20714 7327 7366 detail
data20714 7327 7366 main
data250821 56532 57634 detail
data250821 57527 57634 main
data250821 57359 57474 main
data250821 57212 57301 main
data250821 57140 57159 detail
data250821 56834 57082 main
data250821 56708 56779 main ... (3 Replies)
Discussion started by: perl_beginner
3 Replies
6. Shell Programming and Scripting
Hi,
I need help with this-
input.txt :
L B white
X Y white
A B brown
M Y black
Read this input file and if 3rd column is "white", then add specific lines to another file insert.txt.
If 3rd column is brown, add different set of lines to insert.txt, and so on.
For example, the given... (6 Replies)
Discussion started by: prashob123
6 Replies
7. Shell Programming and Scripting
Hello,
I'm trying to create multiple commands using a variable input from another file but am not getting any successful results.
Basically, file1.txt contains multiple lines with single words:
<file1.txt>
yellow
blue
black
white
I want to create multiple echo commands with these... (8 Replies)
Discussion started by: demmel
8 Replies
8. Shell Programming and Scripting
In the below file I am trying to grep or similar, all lines where only AF= is less than 0.4.. Thank you :).
grep
grep "AF=" ,+ .4 file
file
12 112036782 . T C 34.0248 PASS ... (3 Replies)
Discussion started by: cmccabe
3 Replies
9. Shell Programming and Scripting
In the awk, thanks you @RavinderSingh13, for the help in below, hopefully it is close as I am trying to update the value in $12 of the tab-delimeted file2 with the matching value in $1 of the space delimeted file1. I have added comments for each line as well. Thank you :).
awk
awk '$12 ==... (10 Replies)
Discussion started by: cmccabe
10 Replies
10. Shell Programming and Scripting
I am trying to mv each of the .vcf files in the variants folder to the folder in /home/cmccabe/f2 that the .vcf id is found in file. $2 in file will always have the id of a .vcf in the variants folder. The line in blue staring with R_2019 in file up to the -v5.6 will always be an exact match to a... (4 Replies)
Discussion started by: cmccabe
4 Replies
LEARN ABOUT SUSE
xfce4-power-manager
XFCE4-POWER-MANAGER(1) General Commands Manual XFCE4-POWER-MANAGER(1)
NAME
xfce4-power-manager - The Xfce 4 Power manager
SYNOPSIS
xfce4-power-manager [options]
DESCRIPTION
xfce4-power-manager manages the power sources on the computer and the devices that can be controlled to reduce their power consumption
(such as LCD brightness level, monitor sleep, CPU frequency scaling). In addition, xfce4-power-manager provides a set of freedesktop-com-
pliant DBus interfaces to inform other applications about current power level so that they can adjust their power consumption, and it pro-
vides the inhibit interface which allows applications to prevent automatic sleep actions via the power manager; as an example, the operat-
ing system's package manager should make use of this interface while it is performing update operations.
You can run xfce4-power-manager from the command line without specifying any extra arguments.
OPTIONS
--no-daemon
Starts the power manager in non-daemon mode: useful for debugging.
--restart
Causes the running power manager to restart.
--customize
Shows the configuration dialog.
--quit Causes any running instance of xfce4-power-manager to exit.
BUGS
Please report any bugs to http://bugzilla.xfce.org/. Development discussion should be conducted on the goodies-dev@xfce.org mailing list.
Usage related questions should be directed to the xfce@xfce.org mailing list.
HOMEPAGE
http://goodies.xfce.org/
AUTHOR
Ali Abdallah <aliov@xfce.org>
MANPAGE AUTHORS
Ali Abdallah <aliov@xfce.org>, Robby Workman <rworkman@slackware.com>.
31 March 2009 Version 0.8.0 XFCE4-POWER-MANAGER(1)