Sponsored Content
Top Forums Shell Programming and Scripting How can I make my script simple? Post 302764199 by pamu on Thursday 31st of January 2013 05:33:18 AM
Old 01-31-2013
Try sth like this..

Code:
 
awk 'FNR==1{printf $1 " \t"$2" "}
FNR==1 && NR>1 {print s} 
{s=$2"\t"$3"\t"$4}' FS="," *.xyz

 

10 More Discussions You Might Find Interesting

1. Programming

make script

I need to write a make script to install a C module in a UNIX environment.It should install the sources, build the libraries and install them and also install the info pages on the system. Can this script be general enough to also install on windows, windows dll, windows help file's etc. Any... (3 Replies)
Discussion started by: cherio
3 Replies

2. UNIX for Dummies Questions & Answers

Simple make file questions....i think, thnx

Hello, I'm a noob when comes to make files.... My intentions for the use of my make file are not that of a usual compilation, etc. It is simply to copy some files from a RCS controlled area to a public area which has read rights only for a web page. My dilemma comes in the form of sub... (0 Replies)
Discussion started by: Roxydogg28
0 Replies

3. Shell Programming and Scripting

make it simple!!!

i am having following DML file i want to extract only highlighted area using sed or awk oneliner.. i wrote the following sed command for this .. it works fine but its too complex i guess.. can any one help me out to make it simpler.. thanks in advance.. vidya.. (2 Replies)
Discussion started by: vidyadhar85
2 Replies

4. Shell Programming and Scripting

Help to make the script simple

Hi All, I have a script which throws the output if condition matches. I run the cmd : # ldf Filesystem kbytes used avail capacity Mounted on /dev/dsk/c1t0d0s0 1984564 1375019 550009 72% / /dev/dsk/c1t0d0s3 5040814 2628410 2361996 53% /usr... (4 Replies)
Discussion started by: naw_deepak
4 Replies

5. Shell Programming and Scripting

how to run script? call other script? su to another user? make a cron?

Good morning. I am searching for "how-to"'s for some particular questions: 1. How to write a script in HP-UX 11. 2. How to schedule a script. 3. How to "call" scripts from the original script. 4. How to su to another user from within a script. This is the basics of what the... (15 Replies)
Discussion started by: instant000
15 Replies

6. Shell Programming and Scripting

Script to make simple recurring ascii file edit

Hi, I have an ascii file with recurring lines (the file is 36mb so lots of lines) which look like this: -2.5 -66.324-68.138 935.2 1.953 -0.664 272.617 73.684 -2.428 269.998 0.000 Every 14 lines there is a blank line. I would like to, for each non-blank line,... (2 Replies)
Discussion started by: blueade7
2 Replies

7. Solaris

Trying to do a simple Make!

I am trying to do a make on below and have a question: http://www.datsi.fi.upm.es/~frosal/sources/shc-3.8.7.tgz I am running Solaris 10 on x86. I have untarred the files above. I have gcc and gmake in /usr/sfw/bin BUT when I do >gmake in the directory with above files, it does not... (4 Replies)
Discussion started by: steve701
4 Replies

8. Shell Programming and Scripting

Help making simple perl or bash script to create a simple matrix

Hello all! This is my first post and I'm very new to programming. I would like help creating a simple perl or bash script that I will be using in my work as a junior bioinformatician. Essentially, I would like to take a tab-delimted or .csv text with 3 columns and write them to a "3D" matrix: ... (16 Replies)
Discussion started by: torchij
16 Replies

9. Linux

How to execute a simple select script using a shell script?

Hi team, I have two select statements and need to run them using SYSDBA user select * from temp_temp_seg_usage; select segment_name, tablespace_name, bytes/ (1024*1024) UsedMb from dba_segments where segment_name='TEMP_TEMP_SEG_USAGE'; Need to run this using a shell script say named... (1 Reply)
Discussion started by: pamsy78
1 Replies

10. Shell Programming and Scripting

How to make it simple?

if ];then echo "ifconfig has output,and the output is " ifconfig -a fi this would run twice for "ifconfig -a" (3 Replies)
Discussion started by: yanglei_fage
3 Replies
IRSEND(1)								FSF								 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.8.7pre1 May 2010 IRSEND(1)
All times are GMT -4. The time now is 01:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy