10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear all,
I have a file like this:
imput
scaffold_0 1
scaffold_0 10000
scaffold_0 20000
scaffold_0 25000
scaffold_1 1
scaffold_1 10000
scaffold_1 20000
scaffold_1 23283
and I want the output like this:
scaffold_0 1 scaffold_0 10000
scaffold_0 10000 scaffold_0 20000... (6 Replies)
Discussion started by: valente
6 Replies
2. UNIX for Dummies Questions & Answers
Hello All,
i am a newbie and need some help when reading a csv file in a bourne shell script. I want to read 10 lines, then wait for a minute and then do a reading of another 10 lines and so on in the same way. I want to do this till the end of file.
Any inputs are appreciated
... (3 Replies)
Discussion started by: victor.s
3 Replies
3. UNIX for Dummies Questions & Answers
hi,
this is my script #!/bin/ksh
cat temp_file.dat | while read line
do
read test
if ]; then
break
else echo "ERROR"
fi
done
when i execute this code , the script does wait for the user input . it directly prints "ERROR" and terminates after the no. of times as there... (3 Replies)
Discussion started by: siva1612
3 Replies
4. Shell Programming and Scripting
Hello,
I have this file that sometime contains 0 lines and sometimes 1 or more.
It's supposed to then put the result (could be 0 or 1 or 2 or more) into a variable.
Then it's supposed to echo using an if else statement depending on the value of the variable.
flagvar='wc -l $tempfile |... (1 Reply)
Discussion started by: script_op2a
1 Replies
5. Shell Programming and Scripting
Is this possible?
I have a for loop in a shell script reading a list, but I want each line to be a loop, not each thing with a space.
Here is the example:
HOSTLIST="\
1.2.3.4 serverA
1.2.3.5 serverB"
for NBUHOST in `echo $HOSTLIST`
do
ssh ${SERVERNAME} "echo "${NBUHOST}"... (3 Replies)
Discussion started by: LordJezoX
3 Replies
6. Shell Programming and Scripting
Hi ,
I have a CSV file ( file.csv) with some data as
below:
A,1,abc,x,y,z,,xyz,20100101,99991231
A,1,abc,x,y,z,234,xyz,20100101,99991231
I have to delete the duplicate line based on
unique identifiers which are values in the
fields- 2,3,4,8.These coulmns in both the rows
have same... (6 Replies)
Discussion started by: Sheel
6 Replies
7. Shell Programming and Scripting
Hi there !
I need to treat files with variable line length, and process the tab-delimited words of each line. The tools I know are some basic bash scripting and sed ... I haven't got to python or perl yet.
So my file looks like this
obj1 0.01953 0.34576 0.04418 0.01249
obj2 0.78140... (7 Replies)
Discussion started by: jossojjos
7 Replies
8. Shell Programming and Scripting
i want a shell script to read the a list of numbers from a file and compare with a unique number with the list.
FOR EXAMPLE :
abc.lst file contains d following
2343
3214
45654
563456
5436
Unique number is 2342 (6 Replies)
Discussion started by: pgmfourms
6 Replies
9. Shell Programming and Scripting
Hi ,
I am currently using the while loop in bash shell, as follows.
while read line
do
echo $line
done < file.txt
However, i want to use the while loop on file.txt, which will read the file with 4 lines of gap.
Ex- if file.txt is a file of 100 lines, then i want to use the loop such... (3 Replies)
Discussion started by: jitendriya.dash
3 Replies
10. Shell Programming and Scripting
hi
how can i read a file using the unix script and check for one or more field value for a predefined status/value
for example : the file contains the following text
Name IP Address/Mask Type Connection Status
mgmt-eth0(1) ... (2 Replies)
Discussion started by: aemunathan
2 Replies