06-03-2010
there's no real requirement, although it's mostly best practices...and sensible to someone who wants to stay sane.
The governing shell may take hold of your script and run things incorrectly if the shebang is not present. Certain shells (and programs, like perl) have similar logical patterns and syntax, which may try to execute and provide unexpected results...or just errors. For example, if you're running a ksh script under your bash shell, or vice versa, things are just close enough to seem right, but report errors.
9 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
File 1
<html>ta da....unique file name I want to give file=>343...</html>
<html>da ta 234 </html>
<html>pa da 542 </html>
and so on...
File 2
343
234
542
and so on, each line in File 1 one also corresponds with each line in File 2
I have tried several grep, sed, while .. read, do,... (4 Replies)
Discussion started by: web_developer
4 Replies
2. Shell Programming and Scripting
So, I want to read line-by-line a text file with unknown number of files....
So:
a=1
b=1
while ; do
b=`sed -n '$ap' test`
a=`expr $a + 1`
$here do something with b etc
done
the problem is that sed does not seem to recognise the $a, even when trying
sed -n ' $a p'
So, I cannot read... (3 Replies)
Discussion started by: hakermania
3 Replies
3. Solaris
I get a file which has all its content in a single row.
The file contains xml data containing 3000 records, but all in a single row, making it difficult for Unix to Process the file.
I decided to insert a new line character at all occurrences of a particular string in this file (say replacing... (4 Replies)
Discussion started by: ducati
4 Replies
4. Shell Programming and Scripting
Hi All,
I'm trying to figure out which are the trusted-ips and which are not using a script file.. I have a file named 'ip-list.txt' which contains some ip addresses and another file named 'trusted-ip-list.txt' which also contains some ip addresses. I want to read a line from... (4 Replies)
Discussion started by: mjavalkar
4 Replies
5. 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
6. Shell Programming and Scripting
Hello,
I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be:
SRVXPAPI001 ERRO JUN24 07:28:34 1775
REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F
... (8 Replies)
Discussion started by: Ferocci
8 Replies
7. UNIX for Advanced & Expert Users
I noticed some strange looking parameters on some processes on one of our servers, and after a little playing around we deduced that ksh seemed to be adding a (somewhat random) extra parameter when calling a script without a hashbang in it.
It looks like it's the partial name of the parent... (10 Replies)
Discussion started by: CarloM
10 Replies
8. Shell Programming and Scripting
Hi all,
I have a log file say Test.log that gets updated continuously and it has data in pipe separated format. A sample log file would look like:
<date1>|<data1>|<url1>|<result1>
<date2>|<data2>|<url2>|<result2>
<date3>|<data3>|<url3>|<result3>
<date4>|<data4>|<url4>|<result4>
What I... (3 Replies)
Discussion started by: pat_pramod
3 Replies
9. UNIX for Beginners Questions & Answers
Input file:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 (6 Replies)
Discussion started by: Sagar Singh
6 Replies
LEARN ABOUT DEBIAN
lircmd
LIRCMD(8) System Administration Utilities LIRCMD(8)
NAME
lircmd - LIRC mouse daemon translates infrared signals into mouse events
SYNOPSIS
lircmd [options] [config-file]
DESCRIPTION
This daemon can simulate a MouseSystems, IntelliMouse or IMPS/2 type mouse. It gets the received buttons from lircd and converts them to
mouse events. To make this possible, lircmd needs a config file located in /etc/lircmd.conf. In this file you have to determine which but-
ton from which remote causes a mouse move or a mouse button click. You can also specify a special button which activates or deactivates
the mouse mode.
-h --help
display this message
-v --version
display version
-n --nodaemon
don't fork to background
-u --uinput
generate Linux input events
OPTIONS
If you provide the --nodaemon option lircmd won't fork to background.
On Linux systems the --uinput option will enable automatic generation of Linux input events. lircmd will open /dev/input/uinput and inject
the simulated mouse events into the Linux kernel rather than creating the /dev/lircm device.
FILES
lircmd will use syslogd to output error messages. It depends on your system configuration where they will show up.
DAEMONS
lircd and lircmd are daemons. You should start them in some init script depending on your system. There are some example scripts for dif-
ferent distributions in the contrib directory. lircmd has to be started after lircd as it connects to the socket lircd provides.
If you start lircd or lircmd from your shell prompt you will usually get back immediately to the prompt. Often people think that the pro-
gram has died. But this is not an error. lircd and lircmd are daemons. Daemons always run in background.
SEE ALSO
The documentation for lirc is maintained as html pages. They are located under html/ in the documentation directory.
lircmd 0.9.0-pre1 October 2010 LIRCMD(8)