Yes sure, because of the first statement $filename becomes empty therefore the redirect is appending to nothing and becomes ambiguous.
If you use double quotes around "$filename"
then it becomes an empty string and the message would be
(at least in bash) which is a whole lot more understandable...
---
The necessity of double quotes around the file names are a bash quirk, in other Bourne shell derivatives / POSIX shells this is not necessary..
Last edited by Scrutinizer; 08-26-2014 at 02:20 AM..
hi
i have created socket program with proper IP address and port no
client side port no 1085 and 1086
gateway side port no 1086 and 1085
and port no 1087 and 1088
receiver side port no 1088 and 1087
well it works fine on client and gateway side not on receiver and gateway side... (2 Replies)
required Solaris 5.10 Kernel patch 137111-03
required Solaris 5.10 Fibre Channel Device Driver patch 125184-08
I want to know about the descriptions and what the patches will do. I searched www.sun.com (patches/updates) but don't see I am looking for. (1 Reply)
Here is an awk statement i am using to sum a series of numbers..
awk -F"," '{ for (i=1; i<=NF ; ++i) sum += $i;} # if (i > max) max=i }
END { s=""; for (i=1; i<=max; ++i) { printf "%s%s", s, sum; s=","; } printf "\n" }' filename.csv
It works fine for the summing part. But since my series... (19 Replies)
This script has ambiguous redirect error.
...
cd $HOME
cd folder/work
# search all subfolders in work directory
find -mindepth 1 -maxdepth 1 -type d | while read directory
do
CUR_FOLDER="${directory#"./"}"
cd $CUR_FOLDER
chmod 644 *
for ff in *; do
if ; then
... (5 Replies)
Hi,
I need help on following linux bash script. When I linux commands for loop or while loop on individual file it runs great. but now I want the script to run on N number of files so it gives me ambiguous redirect error on line 12 and syntax error on line 22 : (pls help );
#!/bin/bash
#... (16 Replies)
what is this error log = hda: irq timeout: error=0x00 and how to solve?
every day upon checking the logs i see this error.
hda: irq timeout: error=0x00
hda: irq timeout: error=0x00
hda: irq timeout: error=0x00
hda: irq timeout: error=0x00
hw_client: segfault at 0000000000000046 rip... (3 Replies)
Hi All !
I am just trying to print bash variable in awk statement as string
here is my script
n=1
for file in `ls *.tk |sort -t"-" -k2n,2`; do
ak=`(awk 'FNR=='$n'{print $0}' res.dat)`
awk '{print "'$ak'",$0}' OFS="\t" $file
n=$((n+1))
unset ak
doneI am getting following error
awk:... (7 Replies)
Hi all,
OS is Solaros 10 Sparc
While doing Netbackup upgradation to 7.5 , the server was asked to reboot.
But then it came up in single user mode,
and after I typed format command it showed some disk error.
bash-3.00# format
Searching for disks...WARNING:... (2 Replies)
Hi Guys,
I just got this error:-
Your "cron" job on server2
/usr/5bin/ssh sysmgr@server1 /usr/local/bin/sudo /opt/local/pdm/bin/mount_pdmprod
produced the following output:
** /dev/rdsk/c1t5006016C446023DEd0s2
** /dev/rdsk/c1t5006016C446023DEd1s2
** /dev/rdsk/c1t5006016C446023DEd2s2... (2 Replies)
Discussion started by: manalisharmabe
2 Replies
LEARN ABOUT DEBIAN
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)