Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: Shell_Life
922
Posted By Shell_Life
See if this works for you: sed -e :a -e...
See if this works for you:
sed -e :a -e 's/>\(.*[0-9]\)\([0-9]\{3\}\)/>\1,\2/;ta' Inp_File

Note that there is no need to use "cat".
1,414
Posted By Shell_Life
You can start with this skeleton. Consider...
You can start with this skeleton.

Consider "mx" as text fields - do the same for each one.
#!/usr/bin/ksh
IFS='|'
while read m1 m2 m3 ... mn; do
mx='"'${mx}'"'
echo...
7,144
Posted By Shell_Life
There are several ways you can do it - here is...
There are several ways you can do it - here is one of them:
#!/usr/bin/ksh
ls -1 beach_*.jpg | while read mFName; do
mNewFName=$(echo ${mFName} | sed 's/beach_//')
echo "Now renaming...
759
Posted By Shell_Life
Based on requirement: cut -d'|' -f4-7 Inp_File...
Based on requirement:
cut -d'|' -f4-7 Inp_File | sort -u
1,618
Posted By Shell_Life
echo...
echo 'fish://ulavet@rits1.ula.com.tr/home_put1/bidds/myfo' | sed 's#.*//[^/]*/#/#'
1,155
Posted By Shell_Life
#!/usr/bin/ksh typeset -i mI set -A mMon n/a...
#!/usr/bin/ksh
typeset -i mI
set -A mMon n/a Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
mFrom='20100105'
mTo='20110101'
while read mLine; do
echo ${mLine} | sed...
827
Posted By Shell_Life
!/usr/bin/ksh typeset -i mCnt for mFNameA in...
!/usr/bin/ksh
typeset -i mCnt
for mFNameA in trace*.log; do
mCnt=0
for mFNameB in trace*.log; do
diff ${mFNameA} ${mFNameB} 1>/dev/null/
mRC=$?
if [[ "${mRC}" = "0" ]]; then
...
704
Posted By Shell_Life
See if this helps you: #!/usr/bin/ksh typeset...
See if this helps you:
#!/usr/bin/ksh
typeset -i mChars1
typeset -i mChars2
ls -1 main_directory/*.wcor | while read mFName; do
mBase=$(basename ${mFName} '.wcor')
if [[ -f...
796
Posted By Shell_Life
See if this works for you: xargs -n4 < File
See if this works for you:
xargs -n4 < File
1,760
Posted By Shell_Life
Change teh "TEMP" assignment to: TEMP=$(echo...
Change teh "TEMP" assignment to:
TEMP=$(echo "${i}" | sed -e "s/$PREMID_DT_TM/$POSTMID_DT_TM/")
5,010
Posted By Shell_Life
Here is one way: sed...
Here is one way:
sed '/152.15.x.y/d;/152.9.x.y/d;/152.19.x.y/d;/44.33.x.y/d' /etc/hosts
997
Posted By Shell_Life
Would this do it for you: OVZINCLUDE="16810...
Would this do it for you:
OVZINCLUDE="16810 16811 1689"
for VPS in $OVZINCLUDE
do
echo "Dumping VPSes: $OVZINCLUDE "
mPlus='PLUS_'${OVZINCLUDE}
vzdump --compress --snapshot ${mPlus}...
2,043
Posted By Shell_Life
#!/usr/bin/ksh while read mName mCnt1 mCnt2; do...
#!/usr/bin/ksh
while read mName mCnt1 mCnt2; do
if [[ "${mCnt1}" != "${mCnt2}" ]]; then
echo '<font color="red">'${mName}'</font>' ${mCnt1} ${mCnt2}
else
echo ${mName} ${mCnt1}...
992
Posted By Shell_Life
See if this works for you: grep -q STOPPED...
See if this works for you:
grep -q STOPPED /tmp/msg1$$
if [[ $? -eq 0 ]]; then
if [[ ! -f Found_Stopped ]]; then
mailx -s "GOLDEN GATE PROCESS ABENDED ON $SERVER_NAME" $RECEIPIENT <...
2,560
Posted By Shell_Life
Saggiboy, We are here to help, but before we...
Saggiboy,

We are here to help, but before we can help, we need to have full and precise description of the issue with a sample of input, code and desired output.

Still after you posted multiple...
3,890
Posted By Shell_Life
See if this works for you: sed...
See if this works for you:
sed 's#\(...</GroupingKey>\)#1\1#g' File
964
Posted By Shell_Life
sed 's/^0//' File
sed 's/^0//' File
1,125
Posted By Shell_Life
What about this: sed -e 's/record/ebcdic...
What about this:
sed -e 's/record/ebcdic record/' -e 's/integer (10) present_id;/string (12) present_id;/' Inp_File > Out_File
1,659
Posted By Shell_Life
See if this helps you: #!/usr/bin/ksh cut...
See if this helps you:
#!/usr/bin/ksh
cut -c23- File | while read mFourth mRest; do
echo ${mFourth}
done
1,001
Posted By Shell_Life
Create a file with all your sed statements as: ...
Create a file with all your sed statements as:
s/TSTARTO2GPRSEVENTAPNACCSUM_1/TSTARTO2GPRSEVENTAPNACCSUM_24/g
s/O2GPRSEVENTAPNACCSUM_1/O2GPRSEVENTAPNACCSUM_24/g
......
2,530
Posted By Shell_Life
Why can't you use: rm /dir/test.txt
Why can't you use:
rm /dir/test.txt
2,841
Posted By Shell_Life
Here is an entire different approach: First...
Here is an entire different approach:

First create a file with all 10,000 combinations as follows:
,,,,,,,,SSRTY,RTYUI9,RIGHT1
,,,,,,,,SSI09,ITYIP4,AUSTRALIA
,,,,,,,,SSRTY,ITYIP4,ASIA...
2,841
Posted By Shell_Life
You can create a sed file with all 10,000...
You can create a sed file with all 10,000 combinations as:
s/.*,SSRTY,RTYUI9,.*/&RIGHT1,/
s/.*,SSI09,ITYIP4,.*/&AUSTRALIA,/
s/.*,SSRTY,ITYIP4,.*/&ASIA,/
s/.*,SSRTY,LRTER4,.*/&NORTHUS,/

Then...
814
Posted By Shell_Life
See if this can help you: sed -n...
See if this can help you:
sed -n '/VOXI/s/VOXI//p' File
5,493
Posted By Shell_Life
sed -n '/MMM/{N;N;N;N;N;N;N;N;N;N;p;}' Inp_File |...
sed -n '/MMM/{N;N;N;N;N;N;N;N;N;N;p;}' Inp_File | paste -d, - - - - - - - - - - -
Showing results 1 to 25 of 100

 

Featured Tech Videos

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