Search Results

Search: Posts Made By: spider007
6,535
Posted By spider007
You can use this to get everything before the...
You can use this to get everything before the pattern yyy.
Here I used yyy pattern as field seperator.


cat file|awk -F 'yyy' '{print $1}'


Thanks
82,106
Posted By spider007
Gotam, You can use the below code to test...
Gotam,

You can use the below code to test whether you got some rows using grep.....


count=`grep "search pattern" filename|wc -l`
if [ $count -ne 0 ]
then
echo "pattern match found"...
2,662
Posted By spider007
You can use the below code for i in...
You can use the below code


for i in `cat file1`
do
for j in `cat file2`
do
echo "$j$i"
done
done


Thanks
2,760
Posted By spider007
Small correction to karthigayan's suggestion....
Small correction to karthigayan's suggestion. instead of ./script.sh use . script.sh
Its working....

see the example below

user1@AIXCOE:/home/user1> pwd
/home/user1
user1@AIXCOE:/home/user1>...
1,679
Posted By spider007
Hi Arun, You can use the following script...
Hi Arun,
You can use the following script ......


rm -r final 1>/dev/null 2>/dev/null
for i in `ls -l |grep -v total|sort +5|awk '{print $9}'`
do
cat $i >>final
done
4,072
Posted By spider007
Hi Samoo, I have come up with a script for...
Hi Samoo,

I have come up with a script for your requirement. When tested with sample files with same size it worked fine in deviding all files into 3 sets of equal size.

logic used :

Till...
1,918
Posted By spider007
Hi you can use the following Script ...... ...
Hi you can use the following Script ......

Script:
for file in `cat filelist`
do
rm -r ${file}-arr 1>/dev/null 2>/dev/null
count=1
while read line
do
if [ $(($count %...
4,295
Posted By spider007
Dear Amit, You can also use the below...
Dear Amit,
You can also use the below script.....

cat data
abcd | fghfh | qwer | ertete
aaaa | bbbbb | cccc | dddddd

while read input
do
line1=`echo $input|awk -F\| '{print $1" |" $2" |"...
Showing results 1 to 8 of 8

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