Search Results

Search: Posts Made By: satishmallidi
1,318
Posted By satishmallidi
To find ls of similar pattern files in a directory by passing the variable.
Hi,

I have file in my $datadir as below :-
SAT_1.txt
SAT_2.txt
BAT_UD.lst
BAT_DD1.lst
DUTT_1.txt
DUTT_la.txt

Expected result :-
should get all the above file in $<Filename>_file.lst
...
1,985
Posted By satishmallidi
Thanks varathaneie :) code is working.
Thanks varathaneie :)
code is working.
1,985
Posted By satishmallidi
Change the file name and copy old file content to new file names.
Hi,

I have a files in a directory as below :-
ls -1
mqdepth-S1STC02
proc-mq-S1STC01
proc-mq-S1STC02
proc-mq-S1STC03

Whereever i have S1STC i need to copy them into new file with file...
2,218
Posted By satishmallidi
Print Value between desired html tag
Hi,

I have a html line as below :-...
3,181
Posted By satishmallidi
./CARE_SM_SFTP.sh[27]: put: not found error while doing sftp
yes disedorgue ,Corrected.

Thanks,
Satish.
3,181
Posted By satishmallidi
./CARE_SM_SFTP.sh[27]: put: not found error while doing sftp
Hi,

I am getting the below error while doing sftp in a script file but the same is getting executed when i run from command prompt



./CARE_SM2_SFTP.sh[27]: put: not found



Code...
2,068
Posted By satishmallidi
paste -d: Textfile1.txt Textfile2.txt | awk -F:...
paste -d: Textfile1.txt Textfile2.txt | awk -F: '{A[$2];C[$3]=$4;} END {for (i in A) print i,C[i]}' > <filename>
Output will be saved in the filename
2,068
Posted By satishmallidi
Is there a way to join 2 text files sorted by
paste -d: Textfile1.txt Textfile2.txt | awk -F: '{A[$2];C[$3]=$4;} END {for (i in A) print i,C[i]}'
872
Posted By satishmallidi
Perfect. Thanks Jotne. Can you explain the...
Perfect.
Thanks Jotne.
Can you explain the awk statement i could get it.

---------- Post updated 09-25-13 at 11:08 AM ---------- Previous update was 09-24-13 at 03:17 PM ----------

Thanks...
872
Posted By satishmallidi
Rearranging of values as desired
i have a file as below :-
100 D 22
100 T 33
100 C 89
101 C 55
101 D 44
102 D 88
103 T 22
103 C 13

output format :-
<number> <D value> <C Value> <T Value>
if no value then zero.

I...
3,668
Posted By satishmallidi
sed -n '/pattern/,/^$/p' <FIELNAME> This...
sed -n '/pattern/,/^$/p' <FIELNAME>

This wil print from the pattern to the empty line.

Please use code tags!
18,091
Posted By satishmallidi
-bash-3.2$ dos2unix sample.sh dos2unix:...
-bash-3.2$ dos2unix sample.sh
dos2unix: converting file sample.sh to UNIX format ...

after running the above command still getting the same error while running my script
...
18,091
Posted By satishmallidi
sed and awk giving error ./sample.sh: line 13: sed: command not found
These are commands i gave :-

#!/bin/bash

sed -n '13,$'p /opt/sat/inp/sampledata.txt > /opt/sat/inp/sample2.txt

awk '{print $5}' /opt/sat/inp/sample2.txt > /opt/sat/inp/sample3.txt

...
18,091
Posted By satishmallidi
sed and awk giving error ./sample.sh: line 13: sed: command not found
-bash-3.2$ unamae -a
Linux ukrliccprodems01 2.6.18-238.el5 #1 SMP Sun Dec 19 14:22:44 EST 2010 x86_64 x86_64 x86_64 GNU/Linux

it is a unix system.

Regards,
satish
18,091
Posted By satishmallidi
sed and awk giving error ./sample.sh: line 13: sed: command not found
Hi,
I am running a script sample.sh in bash environment .In the script i am using sed and awk commands which when executed individually from terminal they are getting executed normally but when i...
1,910
Posted By satishmallidi
Want to trap the error
OS - UNIX
DB - oracle
script - ksh

handleInterrupts 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

handleInterrupts
{
echo "\n handling "
cp ~$HOME/sat/* ~$HOME/sat/middlefile/*
}

I am...
1,910
Posted By satishmallidi
Want to trap the error
I was running a script to upload data from file to database but it is failing in middle.Can i use trap command to find the error that is occured while running the script.

Thanks in advance,...
2,703
Posted By satishmallidi
awk : Want to print columns of different input files in line wise
Hi,

I want to print last column of 3 input files with awk.

cat file1.txt file2.txt file3.txt
file1.txt
1 ad 200
2 ss 300

file2.txt
1 mm 444
2 ee 555

file3.txt
1 kk 999
2 jj 555...
2,170
Posted By satishmallidi
Thanks Corona688 !! You made it so simple
Thanks Corona688 !!
You made it so simple
2,170
Posted By satishmallidi
Thanks corona688 i have this code and it is...
Thanks corona688

i have this code and it is working fine.
Actual issue is to read input from 2 files by line wise and print them as below:-
>cat a.txt
RC1
RC2
RC3
RC4
>cat b.txt
11
22...
2,170
Posted By satishmallidi
Reading a file into array
Hi,

I need to read a file into array and print them in a loop:-
1st file :-cat a.txt
RC1
RC2
RC3
RC4

My Program:-
#!/bin/ksh
index=0
while [ $index -lt 5 ]
do
read...
Showing results 1 to 21 of 21

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