Hi guys, I hope you can help me with my problem.
I have a text file that contains lines like this:
78 ANGELO -809.05
79 ANGELO2 -5,000.06
I need to find all occurences of amounts that are negative and replace them with x's
78 ANGELO xxxxxxx
79... (4 Replies)
I want to replace a string within a file using perl.
We have a line that gets commented out, and I want to replace that line now matter how it was commented out.
for example, I'd want to replace
###ES=PR1A with ES=PR1A
or
##LJW(9/16/26)ES=PR1A with ES=PR1A
I tried: perl... (4 Replies)
Hi
I have a text file which contains the following.
AAA,BBB,CCC,DDD
AAA,BBB,CCC,DDD
AAA,BBB,CCC,DDD
How can I replace all CCC with 888, with other contents inside the file remain unchange? Please advice
Desired output:
AAA,BBB,888,DDD
AAA,BBB,888,DDD
AAA,BBB,888,DDD (1 Reply)
Hi I am new to shell scripting but i manage to do some simple things.
I am trying to replace a string in one file. I am using sed to replace but it is not permanently writing to the file, rather it is temporary. I want to know whether is there any another method to replace a string in a file... (7 Replies)
I have one string
string1=user/password:IP_ADDR:Directory
I need to replace string1 value like store into string2
string2=user password:IP_ADDR:Directory
i.e replace "/" character by '<space>' character
But i wouldn't use any file in the meantime.
Please help me......................... (6 Replies)
I posted this issue a week or so ago and I still cant get the script to work. Here is what I have so far and what Im trying to do.
#!/bin/ksh
old="$1"
new="$2"
file=$3
grep $1 $3 > /dev/null
if ;then
cp $3 ${3}.bak
sed "s/$1/$2/g" $3 > ${3}~
mv ${3}~ ${3}
fithe script is... (5 Replies)
Hi All,
I have below file which has data in below format.
#$ | AB_100
| AB_300
()| AB_4
@*(% | AB-789
i want o/p as below format.
| AB_100
| AB_300
| AB_4
| AB-789
So here there is no standard format.
How we can achieve the same in unix ?
Regards, (3 Replies)
Dear Friends,
I want to replace following line with given line.
It should grep/search following string in a file (input.txt)
M/M SRNO: 000M/6200-0362498 COSMETIC PRO MALE FEMALE
Once found it should replace it to following string.
T_DLHNNO: 000M/6200-0362498 ... (7 Replies)
Hi,
I have a text file where all records come in one line (single line file), each record starts with 'BUCH' and ends with '@&' and if data is not there we get space instead. between '@&' and next record there might be some spaces, now I want to remove those spaces between '@&' and 'BUCH'.
... (4 Replies)
I have a text file with the following contents. I am trying to check the column "COL5". If the value is not "0" then I need to replace the value to NA only in COL5.
The problem is that I don't have a clear delimiter here, I have only the column names.
cat input.txt
-08/27/14:08:30:01--
... (5 Replies)
Discussion started by: ctrld
5 Replies
LEARN ABOUT LINUX
irsend
IRSEND(1) User Commands IRSEND(1)NAME
irsend - basic LIRC program to send infra-red commands
SYNOPSIS
irsend [options] DIRECTIVE REMOTE CODE [CODE...]
DESCRIPTION
Asks the lircd daemon to send one or more CIR (Consumer Infra-Red) commands. This is intended for remote control of electronic devices such
as TV boxes, HiFi sets, etc.
DIRECTIVE can be:
SEND_ONCE - send CODE [CODE ...] once
SEND_START - start repeating CODE
SEND_STOP - stop repeating CODE
LIST - list configured remote items
SET_TRANSMITTERS - set transmitters NUM [NUM ...]
SIMULATE - simulate IR event
REMOTE is the name of a remote, as described in the lircd configuration file.
CODE is the name of a remote control key of REMOTE, as it appears in the lircd configuration file.
NUM is the transmitter number of the hardware device.
For the LIST DIRECTIVE, REMOTE and/or CODE can be empty:
LIST "" "" - list all configured remote names
LIST REMOTE "" - list all codes of REMOTE
LIST REMOTE CODE - list only CODE of REMOTE
The SIMULATE command only works if it has been explicitly enabled in lircd.
-h --help
display usage summary
-v --version
display version
-d --device
use given lircd socket [/var/run/lirc/lircd]
-a --address=host[:port]
connect to lircd at this address
-# --count=n
send command n times
EXAMPLES
irsend LIST DenonTuner ""
irsend SEND_ONCE DenonTuner PROG-SCAN
irsend SEND_ONCE OnkyoAmpli VOL-UP VOL-UP VOL-UP VOL-UP
irsend SEND_START OnkyoAmpli VOL-DOWN ; sleep 3
irsend SEND_STOP OnkyoAmpli VOL-DOWN
irsend SET_TRANSMITTERS 1
irsend SET_TRANSMITTERS 1 3 4
irsend SIMULATE "0000000000000476 00 OK TECHNISAT_ST3004S"
FILES
/etc/lirc/lircd.conf
Default lircd configuration file. It should contain all the remotes, their infra-red codes and the corresponding timing and wave-
form details.
DIAGNOSTICS
If lircd is not running (or /var/run/lirc/lircd lacks write permissions) irsend aborts with the following diagnostics:
"irsend: could not connect to socket"
"irsend: Connection refused" (or "Permission denied").
SEE ALSO
The documentation for lirc is maintained as html pages. They are located under html/ in the documentation directory.
lircd(8), mode2(1), smode2(1), xmode2(1), irrecord(1), irw(1), http://www.lirc.org.
irsend 0.9.0-pre1 October 2010 IRSEND(1)