It is your choice :
- Modify a system that works to make it behave as expected with poorly coded scripts
or
- Fix your poorly coded scripts to make it behave as expected on a system that works
IMO you should obviously choose that second option .
I am very sorry to tell you that leaving bad code just because there are numerous (i.e. because of lazyness) is a VERY BAD reason ... in my opinion
So the best piece of advice i can give you is : yes, you need to fix ALL the scripts in which you use such a way of getting datas
This is an opportunity to improve your code, too. If there's numerous places this is used, you could get rid of a lot of redundancy by having that done by one thing which everything else calls or sources instead of having that routine duplicated in 17 different scripts.
Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 2,288
Thanks Given: 430
Thanked 480 Times in 395 Posts
Hi.
There are 3 work-alike codes for utility ls at the perl power tools page:
I downloaded and tried them all on & with:
One was missing a perl module ( Stat/lsMode.pm ), but all compiled and the other 2 ran, although one had a strange output for option "-l". The one that ran correctly compared favorably with the native ls, but not exactly as regards spacing.
So if you wanted to modify ls output with a project-specific code in perl, you could.
However, I agree with many of the others, and suggest that you clean up your scripts. Counting on specific locations in a line for a datum is a very fragile technique, as you have found.
Good luck with whatever decision you make ... cheers, drl
Thank you. Surely I need to modify my code. But I am curious to know if there is a way that we can set the 'ls -l' command dispaly format or it never possible in unix?
Thank you. Surely I need to modify my code. But I am curious to know if there is a way that we can set the 'ls -l' command dispaly format or it never possible in unix?
Thanks
Punitha.S
Without having to get into re-coding the ls command you could just format it, as per DGPicket's suggestion :
How to change the format of an excel from exponential to text through UNIX command
We have a pipe delimited file in which one particular A column is a combination of number+text and while converting into
excel using tr command it is generating a exponential data for the A column.
Kindly... (2 Replies)
Greetings!
After block level migration using an external appliance, the luns are getting reported as DGC-RAID5 and these luns are infact from the new storage. I have a query on changing the device Vendor info from DGC-RAID5 to HP3par in the format o/p only.
AVAILABLE DISK SELECTIONS:
... (3 Replies)
Hi All,
Following is my issue.
$MAIL_DOC = test.txt
test.txt contains the following text .
This process was executed in the %INSTANCE% instance on %RUNDATE%.
I am trying to execute the following script
var=`echo $ORACLE_SID | tr `
NOW=$(date +"%D")
sed -e... (3 Replies)
hi..
i am new to here. can anybody tell me how can we change the date format in the 'last' command.
EX- on running last command i am getting --
rruat pts/12 172.18.40.101 Tue May 3 12:59 still logged in
rruat pts/10 blr2-3f-239.asco Tue May 3 12:59 - 13:09 ... (2 Replies)
I have a website. I have a directory within it with over a hundred .html files. I need to change a date within every file. I don't have an easy way to find/replace.
I need to change 10/31 to 11/30 on every single page at once. I tried the command below but it didn't work. Obviously I don't know... (3 Replies)
Hi,
I would like to know if there is a command similar to scsimgr in HP-UX that
can help me change the algorithm and reserve_policy attributes of all luns presented to an AIX host.
Otherwise I would have to use,
chdev -l hdiskX -a algorithm=round_robin reserve_policy=no_reserve
in a... (1 Reply)
I need to install AIX 5.3 on an RS/6000 Server. When i boot from an AIX 5.3 CD i get an option to upgrade to 5.3 from 5.2(existing OS). Is there a way by which i can force AIX to perform a new install with creating new partitions.
I am looking for the analogue of 'Format' command in AIX that... (2 Replies)