Search Results

Search: Posts Made By: lathavim
2,184
Posted By lathavim
if [ -s $filename2 ] then rm $filename2 ...
if [ -s $filename2 ]
then
rm $filename2
else
rm $filename $filename2
fi
2,017
Posted By lathavim
Try this... #!/bin/ksh if [ "$1" =...
Try this...


#!/bin/ksh
if [ "$1" = "" ];
then ## No parameters were entered
echo "Enter the fully qualified file name:"
read mInputValue
echo "The value is `eval echo $mInputValue`"...
1,438
Posted By lathavim
egrep "$today*.*Port search...
egrep "$today*.*Port search parameters|$today*.*processed" file
5,286
Posted By lathavim
sed -e '1d' -e '/@executable_path/d' -e...
sed -e '1d' -e '/@executable_path/d' -e 's/(.*)$//' -e 's/\/Versions.*$//' file
2,017
Posted By lathavim
what value you are assinging to str2? ...
what value you are assinging to str2?



str2=$str or str2=$str1
3,217
Posted By lathavim
while read record do a=`echo $record | cut...
while read record
do
a=`echo $record | cut -c11-20`
echo $a | grep 1 1>/dev/null
if [ $? -eq 0 ]
then
echo $record >>output
fi
done<input

---------- Post updated at 05:35 AM ----------...
3,217
Posted By lathavim
Hi, For the 6th record, I don't see 1 inbetween...
Hi, For the 6th record, I don't see 1 inbetween 11th & 20th position. Only for the 2nd & 4th records i can see your condition matching. Please could you explain why 6th record has to be present in...
17,594
Posted By lathavim
var=`cat file`
var=`cat file`
5,286
Posted By lathavim
See if this works. sed -e '1d'...
See if this works.




sed -e '1d' -e '/@executable_path/d' filename | cut -d " " -f1
4,279
Posted By lathavim
How about this? sed -n '/ravi...
How about this?



sed -n '/ravi kumar/,/*/p' file
4,587
Posted By lathavim
Try this. sed '/pattern/{N;d;}'...
Try this.



sed '/pattern/{N;d;}' file
4,337
Posted By lathavim
sort -t"," -k1.1,1.4 -k2.7,2.10 -k2.4,2.5...
sort -t"," -k1.1,1.4 -k2.7,2.10 -k2.4,2.5 -k2.1,2.2 file

or


sort -t"," -k1,1n -k2.7,2.10 -k2.4,2.5 -k2.1,2.2 file
3,223
Posted By lathavim
echo $word | sed "s/o/$in1/1" This replaces...
echo $word | sed "s/o/$in1/1"

This replaces first occurance of the char 'O'
3,547
Posted By lathavim
What is $a here? I am bit confused with your...
What is $a here? I am bit confused with your requirement.

If you just want to read and append a line to the end of a file, then try this.


echo "Enter the URL that should point to the...
3,240
Posted By lathavim
for file in `ls folderb` do find foldera...
for file in `ls folderb`
do
find foldera -type f -name "$file" -exec rm -f {} \;
done
1,794
Posted By lathavim
while read record do a=`grep $record file2` ...
while read record
do
a=`grep $record file2`
if [ "$a" == "" ]
then
echo $record >>newfile
fi
done<file1
2,049
Posted By lathavim
Try this. var=`date +"%d%m%Y"` ...
Try this.


var=`date +"%d%m%Y"`

awk '/^HEADER/{close("file"f);f++}{print $0 > '$var'"_FILE_"f}' $Filename
1,694
Posted By lathavim
sed -n '/unknown/{N;N;N;p;}' file
sed -n '/unknown/{N;N;N;p;}' file
19,609
Posted By lathavim
You can try with loop. ls *rft |...
You can try with loop.



ls *rft | head -20 >tmp
while read file
do
cp "$file" ./chk
done<tmp
2,951
Posted By lathavim
Hi, This should work for ksh. ...
Hi, This should work for ksh.


#!/bin/ksh
grep -E 'username1|username4' filename >output


What shell are you using?
2,951
Posted By lathavim
grep -E 'username1|username4' filename
grep -E 'username1|username4' filename
2,951
Posted By lathavim
grep username1 inputfile >>outputfile ...
grep username1 inputfile >>outputfile


Incase if you want to do the search with backslash.

grep username1\\\\ inputfile >>outputfile
5,821
Posted By lathavim
How about this? var="hi how are you" ...
How about this?


var="hi how are you"
echo $var | wc -w
35,644
Posted By lathavim
See if this works. awk '{ if (NR % 3) ...
See if this works.

awk '{
if (NR % 3)
printf("%s ", $0)
else
printf("%s\n", $0)
}' file
2,964
Posted By lathavim
Are you sure that you used accent mark (`) for...
Are you sure that you used accent mark (`) for the ls command? I am wondering whether you have used single quotes.



myfile=`lsMyfile*`


---------- Post updated at 04:38 AM ----------...
Showing results 1 to 25 of 70

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