Hi all,
Ok os heres my situation. I have created a database style program that stores a persons info (name,address,phone number etc.) in a file ("database"). after i read in all the values above, i assign them to a line variable:
line="$name^$address^$phonenum" >> phonebuk
as you can see... (1 Reply)
Hi!
I am working in korn shell. I want to reset the dimiliter for the set command to "|" but instead of a command prompt return I am getting something as below
After issuing the command I am getting this....as if the shell is expecting something else. Can anybody suggest what's the problem.
... (2 Replies)
Hi,
This is out of curiosity:
I wanted to extract year, month and date from a variable, and thought that combining read and IFS would help, but this doesn't work:
echo "2010 10 12" | read y m d
I could extract the parts of the date when separated by a -, and setting IFS in a subshell:
... (3 Replies)
hi I keep getting an error with this nested if statement and am getting the error unexpected end of file, can anyone help me as to why this wont execute?
#!/bin/bash
#script to check wether the -i -v statements run correctly
removeFile ()
{
mv $1 $HOME/deleted
}... (3 Replies)
I am using bash and resetting IFS as below when reading the command line arguments. I do this so I can call my script as in Ex1.
Ex1: ./synt2d-ray3dmod.bash --xsrc=12/20/30
This allows me to split both sides so that when I do "shift"
I can get 12/20/30
What I do not understand is... (21 Replies)
Hi ,
i am in my initial learning phase of unix. i was going thru the function part.
below is the example which was there but i am not able to understand logic and the use of IFS(internal field separator)
lspath() {
OLDIFS="$IFS"
IFS=:
for DIR in $PATH ; do echo $DIR ; done
IFS="$OLDIFS"... (8 Replies)
Hello masters of scripting,
I've been working to develop some basic monitoring scripts. I have solved one problem, but want to know how to solve the other.
I have a script that runs locally to create an output file with the Linux system kernel paramters, preceeded by the system name:
... (2 Replies)
Hi,
I have created a shell script that reads line from text file and insert into DB table. I have used IFS to separate the line text. Looks IFS is splitting text properly but while passing one of the values that has special characters in it to query, it is giving weird issue. Below is my... (2 Replies)
Discussion started by: yuvi
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)