Hi
Is there any command or a trick that can take me to a specifed line number in unix .
Suppose i have a file with 2000 lines and i would like to go to line number 1899 and then print out the contents of the line.
regards
Hrishy (2 Replies)
Hi ,
I use read command to get the input text, When i try to get the line starting with spaces or ending with spaces it automatically truncates the spaces and displays the remaining content.
Code i tried (UserInput.sh):
#!/bin/bash
echo -n "Enter some text > "
read text
echo "You... (3 Replies)
Whenever I type the @ sign like for example when using a proxy ftp server, The system forces the cursor to jump to a new line. I know it has something to do with the terminal settings.
How can I get this to stop and more importantly, how can I modify my profile to set this up whenever I login?
... (3 Replies)
echo "dddd$dddd"|sed 's/$//' will return dddd
echo "dddd$ddd"|tr -d '$' will return dddd
I need to replace it with any other character or just live a blank space instead
Thank you! (8 Replies)
Hi,
Let's I have the following strings (md5):
07177edf8261d28c6a003e583fcbe38c
0717c0037b3a20fc0f0998e673f228d5
0717d611a5d24374628b98e17fd00977,0717d611a5d24374628b98e17fd00977
07189a18afdae558bb5aadfe602e4a91
0719e97d481c239667f38a3e166bed74
071af3225fe50a1fdbb42c43aac313cc... (4 Replies)
I have a file with different directories in it. I would need to move one line within the file to the end of the list. Also not there could be blank line in the middle of it. Example
/vol/fs1
/vol/fs2
/vol/fs3
/vol/fs4
/vol/fs5
/vol/fs6
/vol/fs7
So I would need /vol/fs2... (3 Replies)
example:
comment Now_TB.table column errac is for error messages
1 - first
2 - second
3 -third ;
in this example I need to be able to grab the comment as first word and ; as the last word and it might span a few lines. I need it to be put all in one line without line breaks so I can... (4 Replies)
Hello.
Using a bash script , I have a variable name for the file I want to modify
FILE_TO_EDIT="/etc/my_config_file"And I have a variable name for the parameter to change
PARAMETER="fallback_node"
PARAMETER_NEW_VALUE="http://my_server_name.com/new_path"
A config file may contain :
1°)... (2 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data: It's a shell script using a looping logic, trap, tput, if, while. Most of the scripts in this book aren't written... (2 Replies)
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)