10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Test1.txt
Tom is hot
Test.sh
filename="/directory/Test1.txt"
set - A store
while IFS= read value
do
awk '{split($value,store," ")}'
done < "$filename"
echo ${#sore}
From the code in the executing file, I would like each... (8 Replies)
Discussion started by: TestKing
8 Replies
2. UNIX for Beginners Questions & Answers
value=malayalam
# i need to store the value in an array by splitting the character
#the output i need is
m
a
l
a
y
a
l
a
m
Please use CODE tags for output data as well as required by forum rules! (5 Replies)
Discussion started by: Meeran Rizvi
5 Replies
3. Shell Programming and Scripting
Hello, I have the following code:
while ($line = <fd_in>) {
126 $line = " " . $line ;
127 print "our_line:$line\n";
128 @list = split (/\s+/, $line) ;
129 print "after_split:@list\n";
130 print "$list\t$list\t$list\t$list\t$list\t$list$list\t\n";
131 $len =... (2 Replies)
Discussion started by: Zam_1234
2 Replies
4. Shell Programming and Scripting
Hi,
i have the following code in which i am passing array tldn in awk using -v option & despite of that condition is not getting matched,can somebody suggest how to handle shell arrays in awk
tcount=(9875 9667)
awk -F"\t" -v ltldn="${tldn}" 'NR==FNR {POSTPAIDMDNS=$2"|"$3;next}
... (6 Replies)
Discussion started by: siramitsharma
6 Replies
5. Shell Programming and Scripting
Hi All,
the below is my requirement..
i need to split the file based on line and put that files in a array and need to access that files through loop finally i should send the files through mail..
how can we achieve this ..I am new to shell script please guide me..
I am using KSH..
... (11 Replies)
Discussion started by: kalidoss
11 Replies
6. Shell Programming and Scripting
Hello;
I have a file consists of 4 columns separated by tab. The problem is the third fields. Some of the them are very long but can be split by the vertical bar "|". Also some of them do not contain the string "UniProt", but I could ignore it at this moment, and sort the file afterwards. Here is... (5 Replies)
Discussion started by: yifangt
5 Replies
7. Shell Programming and Scripting
I want to run an awk split on a value that has been pushed through an array and I was wondering what the syntax should be??
e.g. running time strings through an array and trying to examine just minutes:
12:25:30
10:15:13
08:55:23
awk '
NR==FNR{
... (2 Replies)
Discussion started by: dcfargo
2 Replies
8. UNIX for Dummies Questions & Answers
I have gone through all the threads in the forum and tested out different things. I am trying to split a 3GB file into multiple files. Some files are even larger than this.
For example:
split -l 3000000 filename.txt
This is very slow and it splits the file with 3 million records in each... (10 Replies)
Discussion started by: madhunk
10 Replies
9. Shell Programming and Scripting
I have been working on some code for a while, that will parse a log file, look for a specified time discrepancy between entries, and then print that line +/- n other lines out to a file...
#!/bin/bash
file=$1 # The input log file
maxTime=$2 # The time discrepancy to look for
n=$3 ... (1 Reply)
Discussion started by: jjinno
1 Replies
10. Shell Programming and Scripting
Collegues
I have flat file in the following format.
137 (NNP Kerala) (NNP India)
92 (NN Rent) (NN Range)
70 (NNP Thiruvananthapuram) (NNP Kerala)
43 (NNP Tourist) (NNP Home)
40 (NNP Reserve) (NNP Now)
25 (SYM @) (NN hotelskerala)
25 (NNP Thiruvananthapuram-695001) (NNP Kerala)
23 (NN... (3 Replies)
Discussion started by: jaganadh
3 Replies