The portability tag has no wiki summary.
65
votes
3answers
4k views
Why not use “which”? What to use then?
When looking for the path to an executable or checking what would happen would you enter a command name in a Unix shell, there's a plethora of different utilities (which, type, command, whence, where, ...
49
votes
6answers
1k views
Resources for portable shell programming
What resources exist for portable shell programming? The ultimate answer is to test on all targeted platforms, but that's rarely practical.
The POSIX / Single UNIX specification is a start, but it ...
8
votes
6answers
950 views
Bash- detect init system
This may have more to do with detecting operating systems, but I specifically need the init system currently in use on the system.
Fedora 15 now uses systemd, Ubuntu uses Upstart, while others use ...
5
votes
2answers
269 views
Portability of file descriptor links
I've always wondered this but never took the time to find out, so I'll do so now - how portable is the usage shown here of either /proc/$$/fd/$N or /dev/fd/$N? I understand POSIX guarantees /dev/null, ...
11
votes
2answers
313 views
What is the most portable method of launching a terminal emulator?
Say I need to write a script that will launch a terminal and execute a command and I need that to work on various systems. How can I do that in a safe and portable manner?
Is xterm always installed? ...
12
votes
5answers
465 views
How to achieve portability with sed -i (in-place editing)?
I'm writing shell scripts for my server, which is a shared hosting running FreeBSD. I also want to be able to test them locally, on my PC running Linux. Hence, I'm trying to write them in a portable ...
4
votes
2answers
174 views
Which is the most portable of sed, awk, perl and sh?
Can someone put these tools in order of portability? Which of these is certain to be found on even the most minimal *nix systems? Is any of them 100% sure to be present? My guess is that the order is ...
16
votes
2answers
11k views
tar cvf or tar -cvf ?
I have learned to use tar without '-' for options, like tar cvfz dir.tar.gz Directory/ but I recently came accross the slightly different tar -czvf syntax (I think the 'f' must be the last option in ...
16
votes
4answers
1k views
How universal is sudo?
I was writing some instructions on how to install something (TeX-related - if you don't ask, I won't ruin your day by supplying more details) and used sudo to install system-wide. Someone commented ...
1
vote
2answers
1k views
Is “/etc/issue” Common file
I'm trying to Create OS detect portable function in bash script,
So I just want to know, the file "/etc/issue" is common for all Linux Flavors ?



