Sponsored Content
Full Discussion: Development of Unix
Top Forums UNIX for Dummies Questions & Answers Development of Unix Post 302233248 by BOFH on Saturday 6th of September 2008 10:09:56 PM
Old 09-06-2008
Quote:
Originally Posted by MartyIX
Era:
> The Powershell developers have the luxury of a clean slate and a knowledge of history
The whole discussion is about if to renew unix tools or not. And I know it's a courageous question from a man who learns it a few months but I think the question is relevant with the arrival of Windows PowerShell.
Ok, back to your original question then:

Quote:
1. Aren't options of unix commands too much confusing?
Personally, no. I guess to be confused, I'd have to have expectations that they were common across the board. Since I don't have that assumption, if it's something new I'll check the man page for a description and which options I want to use.

Quote:
Why are not standardized in a way that it's "easy" to guess what option one need. It seems to me that unix scripting is a thing where you can "enjoy yourself" but you have to be still worried about type of distribution and so on - isn't it actually drawback?
I think this has been answered a couple of times at the utility and command line switch level. In general I expect there'll be a few differences. Heck, korn shell doesn't work exactly the same between Solaris and HP-UX. I write scripts for the OS I'm most comfortable with and adjust as I get to other systems. Eventually I'm aware of the gotcha's between systems and compensate for it in my scripts with:

if [[ $OS = "SunOS" ]]
then
...
fi

I'm not writing full fledged applications. Just scripts to check for things. Logs are located in different places on systems so I have to have a OS check to see if messages is in /var/adm, /var/log, or /var/cluster/members/member2

If it's a larger script, I'll use perl which is the same across platforms and has the tools within it to mirror what the utilities do.

Quote:
Perderabo:
> Is Powershell really worth learning?
I don't think it's time to say there's Windows PowerShell Comunity Technology Preview 2 and the tool is developing. But for my purposes it's quite good.
That's great for you. As I'm a Unix admin, I have five flavors of Unix at work and four at home not including the Cygwin installations. I have cygwin on my Windows boxes so I have similar commands across all the systems I manage.

Quote:
a few examples:

# Finding files greater than 10MB
$files=get-childitem d:\ -recurse -force
$files | Where {$_.length -gt 10MB} | Sort Length -descending | tee-object D:\tmp\report.txt
# find / -size 10000000c -exec ls -l {} \; | sort -k2 -n | tee /tmp/report.txt

It probably can be better but that's off the top of my head.

Quote:
# Copying files with preserving tree structure
copy -path e:\html -filter *.htm -dest D:\Temp\Project -recurse -container -passthru
# cd /html; tar cf - *.htm | (cd /temp/project; tar fx -)

Quote:
Examples are silly but it's a tool that I've always missed in Windows. (the syntax is quite interesting)
From an advantage point of view, it's there on all the Unix platforms I manage. While the command may differ from place to place, I know the command is still "find" and not "get-childitem". If it doesn't work exactly as expected, I can refer to the man page and find the odd option.

The disadvantage is what you observed. You may have to do some searching when you go to a different system.

The disadvantage for me of learning Powershell is that it's only on Windows systems and I haven't managed Windows systems since NT 3.51. If it comes over to a Unix platform, I might take a look.

Carl
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Unix Serial Driver Development

Hi Friends, I have an immediate requiement to develop a virtual serial communication driver for UNIX based system. The driver should be able to receive all the data, transmitted through the serial port. My goal is to get all the data transmitted through the serial port, do some modification in... (1 Reply)
Discussion started by: santhoshac
1 Replies

2. UNIX for Dummies Questions & Answers

Need Help !....pls i require All n Everything About Unix -History,Development..evrthg

i need to know abt Unix Development,History,Features n Everything..... :confused: (2 Replies)
Discussion started by: Shank
2 Replies

3. Shell Programming and Scripting

Difference between development and Production unix servers for a application??

Hi all I am running a major script of my application in development for implementing code changes for process improvement in time. The script runs in production once in a month . It takes 8 hours 30 mins in Production server . what surprice me is , when I run the same script in development server... (9 Replies)
Discussion started by: sakthifire
9 Replies

4. UNIX for Dummies Questions & Answers

Best development language to monitor the unix server

Hi, I am supposed to create the website to perform some monitoring and management activities on unix server. Activities includes cpu usage,displays currently runing processes,deleting files on the server and so on. Please tell which is best web based language(.net or java) to develop... (6 Replies)
Discussion started by: S_venkatesh
6 Replies

5. What is on Your Mind?

Move From Unix Administration to Development???

Hi Guys, I am into unix administration past few years, i am interested in development, Purely from the Job Market View, should i shift from administration and move to development, will it reduce the options i have (i mean not many companies are into development) Suggestions/Opinions ??? (4 Replies)
Discussion started by: mpdevul
4 Replies

6. Shell Programming and Scripting

scope of oracle plsql development /unix shell scripting

I am working in production support in an leading bank and more of my job is more in oracle/plsql. I am learning unix shell scripting and have started development in the same.I would like to know regarding the scope of these two in the industry.Also would like to know about other scripting... (2 Replies)
Discussion started by: jesthomas
2 Replies

7. What is on Your Mind?

UNIX Admin rail roaded to be java/jboss guy for development

Any Unix Admins out there who were tasked with upgrading and maintaining java/jboss installs and possibly related apps? How did it work out? Any tools to allow developers to tweak their java settings, like a console? I just started looking into this, if anyone has experience I'd appreciate... (0 Replies)
Discussion started by: allenhibbert
0 Replies

8. Shell Programming and Scripting

Switching from production to development envirornment in UNIX

I had a unix scripts in prod. I need to made changes in those scripts which I don't have the edit access. I need to move those scripts from prod to dev to edit. Please tell me how to switch from production to development, So that I can made changes in dev and again move those scripts to Prod. ... (3 Replies)
Discussion started by: Rajeswararao
3 Replies

9. Linux

UNIX Utility Development Conventions?

I'm slowly hacking away at a zsh script that shows some promise as a command line tool. I want to learn more about the conventions regarding command line tool development in Unix (and/or macOS), but don't really know where to look for this information. What is the correct way, or convention, to... (2 Replies)
Discussion started by: MonilGomes
2 Replies
All times are GMT -4. The time now is 11:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy