09-03-2011
is there any way to reflect this change in the original file?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
The awk command awk -F: '{print $1}' test1 gives the first columns of all the lines in file ,is there some command to get a particular column from particular line .
Any help is appreciated.
thanks arif (4 Replies)
Discussion started by: mab_arif16
4 Replies
2. Shell Programming and Scripting
Hi Everybody,
I am trying to write a script that will get some perticuler data from a file and redirect to a file.
My Question is,
I have a Very huge file,In that file I have my required data is started from 25th line and it will ends in 100th line.
I know the line numbers, I need to get all... (9 Replies)
Discussion started by: Anji
9 Replies
3. Shell Programming and Scripting
Hi All,
Could you ppl plz help me in writing into a file , plz find the example below.
Ex:
Name1|092387|Address1
Name2||Address2
After executing command/script the file should look like
Name1|092387|Address1
Name2|+91900236|Address2
plz let me know of you have some solution... (4 Replies)
Discussion started by: shreekrishnagd
4 Replies
4. Shell Programming and Scripting
Hi,
I'm reading and writing a line from one file to another.
Input line is like this:
My name is David. Working on a shell script now.
When I use "echo" or "print" output comes like this,
My name is David. Working on a shell script now.
Sample... (7 Replies)
Discussion started by: dateez
7 Replies
5. Shell Programming and Scripting
I have several files that are being generated every 20 minutes. Each file contains 2 columns. The 1st column is Text, 2nd column is Data.
I would like to generate one single file from all these files as follows:
One instance of 1st column Text, followed by 2nd column Data separated by... (5 Replies)
Discussion started by: subhap
5 Replies
6. Shell Programming and Scripting
My input file:
Class
Number Position Range
1 Initial 50
1 Initial 50
2 Terminal 150
2 Terminal 20
2 Single 10
3 Single 20
4 Double 50
5 Initial 50
5 Initial 60
Class
Number... (11 Replies)
Discussion started by: patrick87
11 Replies
7. UNIX for Dummies Questions & Answers
Hello Everyone.
I am trying to display contains of a file from a specific line to a specific line(let say, from line number 3 to line number 5). For this I got the shell script as shown below:
if ; then
if ; then
tail +$1 $3 | head -n $2
else
... (5 Replies)
Discussion started by: grc
5 Replies
8. Shell Programming and Scripting
Hi experts,
My csv file looks like this
U;cake;michael;temp;;;;
U;bread;john;temp;;;;
U;cocktails;sarah;temp;;;;
I'd like to change the value fo 2nd column to cf+random number , which will look maybe something like this
U;cf20187;michael;temp;;;;
U;cf8926;john;temp;;;;... (7 Replies)
Discussion started by: tententen
7 Replies
9. Shell Programming and Scripting
Hi All,
Can you please guide me to search a string in a particular column of file and return the line number of the line where it was found using awk. As an example :
abc.txt
7000,john,2,1,0,1,6
7001,elen,2,2,0,1,7
7002,sami,2,3,0,1,6
7003,mike,1,4,0,2,1
8001,nike,1,5,0,1,8... (3 Replies)
Discussion started by: arunshankar.c
3 Replies
10. Shell Programming and Scripting
Hello,
I have a question on how to find the line number of the first column that contains specific data. I know how to print all the line numbers of those columns, but haven't been able to figure out how to print only the first one that is found.
For example, if my data has four columns:
115... (3 Replies)
Discussion started by: user553
3 Replies
LEARN ABOUT MOJAVE
setleds
SETLEDS(1) General Commands Manual SETLEDS(1)
NAME
setleds - set the keyboard leds
SYNOPSIS
setleds [-v] [-L] [-D] [-F] [{+|-}num] [{+|-}caps] [{+|-}scroll]
DESCRIPTION
Setleds reports and changes the led flag settings of a VT (namely NumLock, CapsLock and ScrollLock). Without arguments, setleds prints the
current settings. With arguments, it sets or clears the indicated flags (and leaves the others unchanged). The settings before and after
the change are reported if the -v flag is given.
The led flag settings are specific for each VT (and the VT corresponding to stdin is used).
By default (or with option -F), setleds will only change the VT flags (and their setting may be reflected by the keyboard leds).
With option -D, setleds will change both the VT flags and their default settings (so that a subsequent reset will not undo the change).
This might be useful for people who always want to have numlock set.
With option -L, setleds will not touch the VT flags, but only change the leds. From this moment on, the leds will no longer reflect the VT
flags (but display whatever is put into them). The command setleds -L (without further arguments) will restore the situation in which the
leds reflect the VT flags.
One might use setleds in /etc/rc to define the initial and default state of NumLock, e.g. by
INITTY=/dev/tty[1-8]
for tty in $INITTY; do
setleds -D +num < $tty
done
OPTIONS
-num +num
Clear or set NumLock. (At present, the NumLock setting influences the interpretation of keypad keys. Pressing the NumLock key com-
plements the NumLock setting.)
-caps +caps
Clear or set CapsLock. (At present, the CapsLock setting complements the Shift key when applied to letters. Pressing the CapsLock
key complements the CapsLock setting.)
-scroll +scroll
Clear or set ScrollLock. (At present, pressing the ScrollLock key (or ^S/^Q) stops/starts console output.)
BUGS
In keyboard application mode the NumLock key does not influence the NumLock flag setting.
SEE ALSO
loadkeys(1)
24 Sep 1994 SETLEDS(1)