11-26-2011
Update the mileage on a bike
assume line 4 is:
2005:Suzuki:GS500f:Blue:6500:6000:6500:6500:6500:7000
I've extracted the 10th field of the 4th line i.e. 7000.
User enters 12000 (new odometer reading)
If the difference is greater than 4000 (scheduled maintenance), I need to "service" the bike and update the mileage.
Replace 4th line, 10th field with new odometer reading
2005:Suzuki:GS500f:Blue:6500:6000:6500:6500:6500:12000
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
using sed to replace a specific string on a specific line number using variables
this is where i am at
grep -v WARNING output | grep -v spawn | grep -v Passphrase | grep -v Authentication | grep -v '/sbin/tfadmin netguard -C'| grep -v 'NETWORK>' >> output.clean
grep -n Destination... (2 Replies)
Discussion started by: todd.cutting
2 Replies
2. Shell Programming and Scripting
I am trying to use sed to replace specific characters at a specific position in the file with a different value... can this be done?
Example:
File:
A0199999123
A0199999124
A0199999125
Need to replace 99999 in positions 3-7 with 88888.
Any help is appreciated. (5 Replies)
Discussion started by: programmer22
5 Replies
3. Shell Programming and Scripting
I need to replace specific field (x) in a table with new value (y):
Input:
1 2 3 4
5 x 6 7
8 9 0 0
Output:
1 2 3 4
5 y 6 7
8 9 0 0
I have no idea how to do this. (10 Replies)
Discussion started by: setepo
10 Replies
4. Shell Programming and Scripting
Say the input was as follows:
Brat 20 x 1000 32rf
Pour 15 p 1621 05pr
Dart 10 z 1111 22xx
My program prompts for an input, what I want is to use the input to locate a specific field. Like if I type in, "Pou" then it would return "Pour" and just "Pour"
I currently have this line but it is... (6 Replies)
Discussion started by: Bungkai
6 Replies
5. Shell Programming and Scripting
Hello,
I'm trying the solve the following problem.
I have a file which I intend to use as a csv called master.csv
The columns are separated by commas.
I want to change the text on a specific row in either column 3,4,5 or 6 from xxx to yyy depending upon if column 1 matches a specified pattern.... (3 Replies)
Discussion started by: cyphex
3 Replies
6. Shell Programming and Scripting
Hi, I am trying to use an awk command to replace specific character positions on a line beginning with 80 with contents of another file.
The line beginning with 80 in file1 is as follows:
I want to replace the 000000000178800 (positions 34 - 49) on this file with the contents of... (2 Replies)
Discussion started by: nwalsh88
2 Replies
7. Shell Programming and Scripting
my requirement is,
consider a file output
cat output
blah sdjfhjkd jsdfhjksdh
sdfs 23423 sdfsdf sdf"sdfsdf"sdfsdf"""""dsf
hellow there
this doesnt look good
et cetc etc
etcetera
i want to replace a line of line number 4 ("this doesnt look good") with some other line
... (3 Replies)
Discussion started by: vivek d r
3 Replies
8. Shell Programming and Scripting
Hello,
i need help with awk.
I have this file:
cat number
DirB port 67 er_enc_out 0 er_bad_os 0
DirB port 71 er_enc_out 56 er_bad_os 0
DirB port 74 er_enc_out 0 er_bad_os 0
DirB port 75 ... (4 Replies)
Discussion started by: elilmal
4 Replies
9. Shell Programming and Scripting
Hi,
I have a file like below
PRUM,67016800 ,CC ,C1,67016800 , ,Y,Y,2 ,CK,BX,FOX ,00000001,EA,00000001,20141120 00:00:00, ,N,Y,Y,CK ABCDEF... (7 Replies)
Discussion started by: mady135
7 Replies
10. UNIX for Dummies Questions & Answers
Hi Folks,
I have the file in which I need to multiply the content of a line and replace the initial content of that line with the obtained answer.
For example if this is my input file file1.txt
2.259314750 xxxxxx
1.962774350 xxxxxx
2.916817290 xxxxxx
1.355026900 ... (4 Replies)
Discussion started by: Madiouma Ndiaye
4 Replies
LEARN ABOUT SUSE
xfindproxy
XFINDPROXY(1) General Commands Manual XFINDPROXY(1)
NAME
xfindproxy - locate proxy services
SYNOPSIS
xfindproxy -manager managerAddr -name serviceName -server serverAddr [-auth] [-host hostAddr] [-options opts]
DESCRIPTION
xfindproxy is a program used to locate available proxy services. It utilizes the Proxy Management Protocol to communicate with a proxy
manager. The proxy manager keeps track of all available proxy services, starts new proxies when necessary, and makes sure that proxies are
shared whenever possible.
The -manager argument is required, and it specifies the network address of the proxy manager. The format of the address is a standard ICE
network id (for example, "tcp/blah.x.org:6500").
The -name argument is required, and it specifies the name of the desired proxy service (for example, "LBX"). The name is case insensitive.
The -server argument is also required, and it specifies the address of the target server. The format of the address is specific to the
proxy service specified with the -name argument. For example, for a proxy service of "LBX", the address would be an X display address
(e.g, "blah.x.org:0").
The -auth argument is optional. If specified, xfindproxy will read 2 lines from standard input. The first line is an authoriza-
tion/authentication name. The second line is the authorization/authentication data in hex format (the same format used by xauth). xfind-
proxy will pass this auth data to the proxy, and in most cases, will be used by the proxy to authorize/authenticate itself to the target
server.
The -host argument is optional. If xfindproxy starts a new proxy service, it will pass the host specified. The proxy may choose to
restrict all connections to this host. In the event that xfindproxy locates an already existing proxy, the host will be passed, but the
semantics of how the proxy uses this host are undefined.
The -options argument is optional. If xfindproxy starts a new proxy service, it will pass any options specified. The semantics of the
options are specific to each proxy server and are not defined here. In the event that xfindproxy locates an already existing proxy, the
options will be passed, but the semantics of how the proxy uses these options are undefined.
If xfindproxy is successful in obtaining a proxy address, it will print it to stdout. The format of the proxy address is specific to the
proxy service being used. For example, for a proxy service of "LBX", the proxy address would be the X display address of the proxy (e.g,
"blah.x.org:63").
If xfindproxy is unsuccessful in obtaining a proxy address, it will print an error to stderr.
SEE ALSO
proxymngr (1), Proxy Management Protocol spec V1.0
AUTHOR
Ralph Mor, X Consortium
X Version 11 xfindproxy 1.0.1 XFINDPROXY(1)