Search Results

Search: Posts Made By: vincyoxy
6,911
Posted By vincyoxy
Foreach loop. Error : Too many words from ``
Hi expert,

I have a large text file :-
number.txt

1
2
3
4
5
6
....


And i using csh foreach loop to read the file line by line.

foreach line(`cat number.txt)
set number = $line...
1,343
Posted By vincyoxy
Can help me explain this script?
Hi expert
Can help me explain this script?


myFile="./File"
myCell=""
while [ 1 ]
do
read myCell || break
echo ""
echo "***************************"
echo...
4,641
Posted By vincyoxy
if loop (yes/no)?
Hi Expert,
I using csh and have many files named *.txt
Example:

Clock.txt
Name.txt
Status.txt
Age.txt


#!/bin/csh
if(-f *txt)
echo "Remove files (y/n)?"
set Ans = $<
if($Ans == y...
2,270
Posted By vincyoxy
Compare number of line
Hi expert,
I using csh and i trying to compare no. of line of the file.
Example:
I have 2 files.
file1

ONE
TWO
THREE
FOUR
FIVE
file 2

ONE
TWO
THREE
FOUR


file1 have 5 lines but...
10,694
Posted By vincyoxy
Output is :- [$0]++' file Event not found ...
Output is :-

[$0]++' file Event not found

Why ah?
10,694
Posted By vincyoxy
Whiteboard ans is worked. But I duno why Yogesh...
Whiteboard ans is worked.
But I duno why Yogesh ans cant worked.
anyway, Thks for ur help =)
10,694
Posted By vincyoxy
Delete repeated word in text file
Hi expert,
I am using C shell. And i trying to delete repeated word.

Example file.txt:

BLUE
YELLOW
RED
VIOLET
RED
RED
BLUE
WHITE
YELLOW
BLACK


and i wan store the output into a...
28,115
Posted By vincyoxy
Thks. The problem is inside while( ) ,right? ...
Thks.
The problem is inside while( ) ,right?
if my no. of array is unlimited or unknown,
I should put what in while ( ) ?
Thks for your help =)
28,115
Posted By vincyoxy
How to solve Subscript out of range?
Hi everyone
I want to compare numbers line by line
Example
array = 12 15 15 19 14

I have code:

#!bin/csh
set a = 1
set b = 2
while($a<6)
if($array[$a] == $array[$b])then
echo "EQUAL"...
4,578
Posted By vincyoxy
Help with awk in array in while loop
Hi everyone:)
I have 2 files - IN & OUT. Example:

IN
A:13:30
B:45:40
.
.
. UNLIMITED

OUT
Z:12:24
Y:20:15
.
.
. UNLIMITED


I want first row of numbers of IN - OUT....
2,639
Posted By vincyoxy
Thks. But i cant use that way cox i have 2...
Thks.
But i cant use that way cox
i have 2 file.
FIRST file contain
15
16
17


SECOND file contain
40
46
48

code is :-
set A = `awk '{print $1}' FIRST |awk '{array[NR]=$0} END...
2,639
Posted By vincyoxy
Simple using For loop
Hi expert,
I'm using csh

Code:
#!/bin/csh
set x = 0

set number = `awk '{array[NR]=$0} END {print array[x];}'`

i want to use for loop to store data to $number repeatly
untill x = 23...
Showing results 1 to 12 of 12

 
All times are GMT -4. The time now is 11:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy