Search Results

Search: Posts Made By: Shell_Life
109,421
Posted By Shell_Life
LeeRoberts, Here is one way of doing this: ...
LeeRoberts,
Here is one way of doing this:

(cat input_file ; echo "WITH A NEW LINE") > output_file
19,455
Posted By Shell_Life
sed '1s/^/New first line\^J/' inp_file Where...
sed '1s/^/New first line\^J/' inp_file

Where ^J is entered as two different key strokes:
<ctl-v> and <enter>
Forum: Filesystems, Disks and Memory 05-16-2007
31,146
Posted By Shell_Life
igidttam, See if this works for you: du -a...
igidttam,
See if this works for you:

du -a | sort -nr | head -50
1,144
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,728
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...
12,464
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...
947
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,843
Posted By Shell_Life
echo...
echo 'fish://ulavet@rits1.ula.com.tr/home_put1/bidds/myfo' | sed 's#.*//[^/]*/#/#'
1,383
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...
999
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
...
822
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...
2,350
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/")
6,066
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
953
Posted By Shell_Life
See if this works for you: xargs -n4 < File
See if this works for you:
xargs -n4 < File
1,430
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,641
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}...
1,156
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,907
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...
4,586
Posted By Shell_Life
See if this works for you: sed...
See if this works for you:
sed 's#\(...</GroupingKey>\)#1\1#g' File
1,230
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
......
1,988
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,232
Posted By Shell_Life
sed 's/^0//' File
sed 's/^0//' File
1,366
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
2,778
Posted By Shell_Life
Why can't you use: rm /dir/test.txt
Why can't you use:
rm /dir/test.txt
3,523
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...
Showing results 1 to 25 of 100

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