07-13-2010
how to get the solution using command line arguments?
Thank you all for the reply.
I am passing the parameters as command line arguments. In that case how do I get the desired result?
Thank you.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello, I need help in appending the line number of each line to the file and also to get the total number of lines. Can somebody please help me.
I have a file say:
abc
def
ccc
ddd
ffff
The output should be:
Instance1=abc
Instance2=def
Instance3=ccc
Instance4=ddd
Instance5=ffff
... (2 Replies)
Discussion started by: chiru_h
2 Replies
2. Shell Programming and Scripting
Hi,
I have a huge file & I want to add a specific text in column. But I want to add this text from a specific line number to a specific line number & another text in to another range of line numbers.
To be more specific: lets say my file has 1000 lines & 4 Columns. I want to add text "Hello"... (2 Replies)
Discussion started by: Ezy
2 Replies
3. 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
4. Shell Programming and Scripting
Hi Guys,
I am new to unix.
Actually i want help in writing an single command where
i can actually read specific line number in file where the line number will be passed to command as parameter.
ex.
1 a
2 b
3 c
4 d
And to my command i pass as 2.
so i should get output as 2 b
... (15 Replies)
Discussion started by: kam786sim
15 Replies
5. Shell Programming and Scripting
I want a script that will move everything beyond a certain line number or beyond a certain content word into another file.
For example, if file A has this:
first line
second line
third line
forth line
fifth line
sixth line
I want to run a script that will move everything beyond the third... (4 Replies)
Discussion started by: robp2175
4 Replies
6. Shell Programming and Scripting
Hello Guys
Please help me with the below issue
I want to read a flat file source upto certain number of columns
Say my flat file has 30 columns but I want to read upto 25 columns only
How come the above issue can be addressed?
Thanks a lot!!!! (1 Reply)
Discussion started by: Pratik4891
1 Replies
7. 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
8. Shell Programming and Scripting
Hello everyone,
I don't really know anything about scripting, but I have to manage to make this script, out of necessity.
#!/bin/bash
while read -r line; do #I'm reading from a big wordlist
instructions using $line
done
Is there a way to automatically write the $line number the script... (4 Replies)
Discussion started by: bobylapointe
4 Replies
9. Shell Programming and Scripting
I am new to ksh scripts. I would like to be able to read a file line by line from a certain line number. I have a specific line number saved in a variable, say $lineNumber. How can I start reading the file from the line number saved in $lineNumber? Thanks! (4 Replies)
Discussion started by: dcowboys13
4 Replies
10. Shell Programming and Scripting
Hi all - I'm completely stumped by a script I'm working on...
The short version is I have a file called 'lookup' and in it are hundreds of names (first and last). I have a script that basically allows the user to enter a name, and what I need to have happen is something like this:
Record... (8 Replies)
Discussion started by: sabster
8 Replies
LEARN ABOUT HPUX
dteditorgotoline
DtEditorGoToLine(library call) DtEditorGoToLine(library call)
NAME
DtEditorGoToLine -- move the insert cursor for a DtEditor widget to a specified line
SYNOPSIS
#include <Dt/Editor.h>
void DtEditorGoToLine(
Widget widget,
int lineNumber);
DESCRIPTION
The DtEditorGoToLine function moves the insert cursor for the DtEditor widget to the beginning of the line specified by the lineNumber
argument. The cursor can be moved to the last line by specifying DtEDITOR_LAST_LINE as the line number. If the line is not currently on-
screen, the contents for the DtEditor widget are scrolled to display the new insertion position.
The lineNumber argument is the number of the line in the file, counting from 1. If the lineNumber argument is less than 1, the insert cur-
sor is placed at the beginning of the first line. If the argument is greater than the total number of lines, the cursor is placed at the
last line of text.
The insert cursor can be moved to a specific character position with DtEditorSetInsertionPosition(3). The DtNtopCharacter resource can be
used to control which line is displayed at the top of the DtEditor widget.
The widget argument specifies the DtEditor widget ID.
The lineNumber argument specifies the line number within the DtEditor widget.
For a complete definition of the DtEditor widget and its associated resources, see DtEditor(3).
RETURN VALUE
The DtEditorGoToLine function returns no value.
SEE ALSO
Dt/Editor.h - DtEditor(5), DtEditor(3), DtEditorSetInsertionPosition(3).
DtEditorGoToLine(library call)