Search Results

Search: Posts Made By: mailme0712
3,680
Posted By mailme0712
Try this
for line in `cat /dir/s.sh`
do
echo $line >file.sh
sed 's/ali1@abcd.com/ali@abcd.com/g' file.sh >>output.sh
done
mv output.sh s.sh

or

sed 's/ali1@abcd.com/ali@abcd.com/g'...
1,866
Posted By mailme0712
#!/bin/sh dir="/mnt/abc" #(based on ur...
#!/bin/sh
dir="/mnt/abc" #(based on ur requirement)
today=`date "+%Y%m%d"`
cd $dir
ls *$today* #use find command instead of ls
#use grep command for search
grep -w "word" *$today*
2,298
Posted By mailme0712
NF- Total Number of Fields in a row
NF- Total Number of Fields in a row
7,422
Posted By mailme0712
Hi, simply use for loop #!/bin/ksh ...
Hi,

simply use for loop

#!/bin/ksh

for file in datafileA datafileB
do
your code (to load the datafile)
done

execute the script using nohup commnad. (nohup script)
19,977
Posted By mailme0712
Try this
Hi,

I am not clear your question,

Try this

sed '/STRING/ s/$/STRING1/' filename
19,977
Posted By mailme0712
Try this
Hi,

I am not clear your question,

Try this

sed '/1/ s/$/;chmod644/' filename
2,357
Posted By mailme0712
Hi, Check this sed -e...
Hi,

Check this

sed -e 's/<body>/${m_tag}/g' "$file" > "$file".tmp && mv -f "$file".tmp "$file"




Thanks,

Thangaraju
2,006
Posted By mailme0712
Hi, use the following command comm -23...
Hi,

use the following command

comm -23 <(sort file1) <(sort file2)




Thanks,

Thangaraju
6,390
Posted By mailme0712
try this if [[ "$?" -eq 0 ]]; then
try this

if [[ "$?" -eq 0 ]]; then
1,534
Posted By mailme0712
try this code
Hi,

#!/usr/bin/perl
open(FH,"</filepath") or die "can't open the file";
@array=<FH>;
close(FH);
foreach $file (@array)
{

//your coding

}
18,162
Posted By mailme0712
using for loop
Hi try this

#!/bin/bash
for i in `ls`
do
grep -i "searchstring" $i >>newfile
done

use the regular expression syntax instead of search string

I hope this will help u.

Raju
41,093
Posted By mailme0712
using find command followed by if condition
Hi try this

file=`find dirpath -type f -name "filename" -exec grep 06 {} \;`

if [ "$file" = "" ] ; then
var=0
else
var=1
fi
Showing results 1 to 12 of 12

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