How about (case sensitive):
case insensitive:
(I chose this because of speed. It should be proportional to (3-5)*n (n=size of biggest file) instead of m*n for a loop. )
Last edited by Scrutinizer; 11-08-2009 at 06:53 PM..
Hi all,
I need to know what command/s I can use to print lines from a file. I cannot do pattern matching, so grepping for a string is not possible. I'd like to say "print line 3" etc. Any ideas? Ta. (2 Replies)
I have a file where each line is a stream of text as follows,
table1, select * from table1
table2, select * from table2
How do i loop through the file line by line? I have tried doing the following
for line in `cat file.txt`
do
echo $line
done
and ...
cat file.txt|while read line... (2 Replies)
Hi friends
I need to get what ever line number i want
Supplier.profile
-----------------
SFTP/INVTRAN
SFTP/INVSNAP
GATEWAY/INVTRAN
GATEWAY/INVSNAP
----------------
exec 0<$Supplier.profile
while read LINE
do
echo $LINE (1 Reply)
I need to print ist and last line of a file
My file having
abc
def
dfg
jkl
bnm
outout will be
abc
bnm
---------- Post updated at 11:24 PM ---------- Previous update was at 11:16 PM ----------
pls help me out. Can any one do this. (5 Replies)
I have a .csv file which is seperated with (;)
inputfile
---------
ZZZZ;AAAA;BBB;CCCC;DDD;EEE;
YYYY;BBBB;CCC;DDDD;EEE;FFF;
...
...
reading file line by line till end of file.
while reading each line output format should be .
i need to print only specific columns let say 5th... (2 Replies)
Hi Experts,
I am very new to scripting and have a prb since few days and it is urgent to solve so much appreciated if u help me.
i have 2 files
file1.txt
9647810043118
9647810043126
9647810043155
9647810043161
9647810043166
9647810043185
9647810043200
9647810043203
9647810043250... (22 Replies)
Need to print file contents from line number A to line-number B
eg:
# cat -n a
1 aaaaaaaaaaaaa
2 bbbbbbbbbbbbb
3 ccccccccccccc
4 ddddddddddddd
5 eeeeeeeeeeeee
6 ffffffffffffff
7 gggggggggggg
## Need to print contents from linenum 3-6 only... (9 Replies)
example of problem:
when I echo "$e" >> /home/cogiz/file.txt
result prints to file as:AA
BB
CC
I need it to save to file as this:AA BB CC
I know it's probably something really simple but any help would be greatly appreciated.
Thank You.
Cogiz (7 Replies)
Hi All,
i want to write a shell script read below file line by line and want to exclude the lines which contains empty value for MOUNTPOINT field.
i am using centos 7 Operating system.
want to read below file.
# cat /tmp/d5
NAME="/dev/sda" TYPE="disk" SIZE="60G" OWNER="root"... (4 Replies)
Discussion started by: balu1234
4 Replies
LEARN ABOUT CENTOS
tk_getjoinstyle
Tk_GetJoinStyle(3) Tk Library Procedures Tk_GetJoinStyle(3)__________________________________________________________________________________________________________________________________________________NAME
Tk_GetJoinStyle, Tk_NameOfJoinStyle - translate between strings and join styles
SYNOPSIS
#include <tk.h>
int
Tk_GetJoinStyle(interp, string, joinPtr)
const char *
Tk_NameOfJoinStyle(join)
ARGUMENTS
Tcl_Interp *interp (in) Interpreter to use for error reporting.
const char *string (in) String containing name of join style: one of "bevel", "miter", or "round".
int *joinPtr (out) Pointer to location in which to store X join style corresponding to string.
int join (in) Join style: one of JoinBevel, JoinMiter, JoinRound.
_________________________________________________________________DESCRIPTION
Tk_GetJoinStyle places in *joinPtr the X join style corresponding to string, which will be one of JoinBevel, JoinMiter, or JoinRound. Join
styles are typically used in X graphics contexts to indicate how adjacent line segments should be joined together. See the X documentation
for information on what each style implies.
Under normal circumstances the return value is TCL_OK and interp is unused. If string does not contain a valid join style or an abbrevia-
tion of one of these names, then an error message is stored in interp->result, TCL_ERROR is returned, and *joinPtr is unmodified.
Tk_NameOfJoinStyle is the logical inverse of Tk_GetJoinStyle. Given a join style such as JoinBevel it returns a statically-allocated
string corresponding to join. If join is not a legal join style, then "unknown join style" is returned.
KEYWORDS
bevel, join style, miter, round
TkTk_GetJoinStyle(3)