Hi, guys. I have one question:
How can I search for a line with certain string in it and then insert a string into this line?
For example:
There is a file called shadow, the contents of it are below:
**************************
...
yuanz:VIRADxMsadfDF/Q:0:0:50:7:::... (9 Replies)
Hi,
I am on an AIX Unix box and I am trying to search for a string in between specified lines of code when I vi a file. I can use the '/string' to search for the string through out the file, but can we only search in between specific lines.
I can use the below sed command to search for the... (8 Replies)
I have two files abc.dat and sant.dat (Big file 60k rows)
for every line's 1,4 of abc.dat need to seach if this is present on 28,4 of sant.dat every line.
if its present the output needs to go to bde.dat
Example:
contents abc.dat
aaaa
bbbb
cccc
dddd
contents sant.dat
this is... (4 Replies)
Hi,
I have list of directory paths in a variable and i want to delete those dirs and if dir does not exist then search that string and get the correct path from xml file after that delete the correct directory. i tried to use grep and it prints the entire line from the search.once i get the entire... (7 Replies)
I woud like to substitue a string on a specific position for specific lines
I've got a file and I would like to change a specific string from "TOCHANGE" to "ABCABCAB"
For every line (except 1,2, 3 and the last one) , I need to check between the 9th and the 16th digits.
For the 3rd line, I... (7 Replies)
if the first string matches then print the previous line and current line and also print the following lines if the other string search matches.
Input
------
TranTime 2012 10 12
The Record starts here
Accountnumber: 4632473431274
TxnCode 323
TranID 329473242834
ccsdkcnsdncskd... (7 Replies)
hi guys,
i want command or script to display the content of file from 2nd position to last but one position of a file
abcdefghdasdasdsd
123,345,678,345,323
434,656,656,656,656
678,878,878,989,545
4565656667,65656
i want to display the same above file without first and... (2 Replies)
Discussion started by: hemanthsaikumar
2 Replies
LEARN ABOUT DEBIAN
ndselect
NDSELECT(1) User Commands NDSELECT(1)NAME
ndselect - select lines and fields for numdiff
DESCRIPTION
Usage: ndselect -h|--help|-v|--version or
ndselect [-b N][-e N][-s N][-F N][-L N][-I N][-S IFS][-x][-l PATH][-o PATH] [FILE]
Print to standard output a subset of lines and fields from a given file.
The argument after the options is the name of the file to read from. The complete path of the file should be given, a directory name is
not accepted. If no input file is specified, the program reads from the standard input.
Exit status: 0 in case of normal termination, -1 (255) in case of error
-b, --beginning, --start=N
Set to N the number of the first line to print (The default behavior is to start with line number 1)
-e, --end=N
Set to N the number of the last line that can be printed (The default behavior is to arrive till to the end of the file)
-s, --step=N
Set to N the increment to use when selecting the lines to print (The default value for the increment is 1)
-F, --first-field=N
Set to N the number of the first field to print (The default behavior is to start with field number 1)
-L, --last-field=N
Set to N the number of the last field that can be printed (The default behavior is to arrive till to the end of every line)
-I, --increment=N
Set to N the increment to use when selecting the fields to print (The default value for the increment is 1)
-S, --separator=IFS
Specify the set of characters to use to split the input lines into fields (The default set of characters is space, tab and newline).
-x, --omit-empty-lines
Do not print empty lines
-l, --warnings-to=PATH
Redirect warning and error messages from stderr to the indicated file
-o, --output=PATH
Redirect output from stdout to the indicated file
-h, --help
Show this help message
-v, --version
Show version number, Copyright, Distribution Terms and NO-Warranty
COPYRIGHT
Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Ivano Primi <ivprimi@libero.it>
License GPLv3+: GNU GPL version 3 or later, see <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO
The full documentation for ndselect is maintained as a Texinfo manual. If the info and ndselect programs are properly installed at your
site, the command
info numdiff
should give you access to the complete manual.
ndselect 5.6.0 January 2012 NDSELECT(1)