01-25-2009
Quote:
Originally Posted by
shira
Wow, Bill Joy is not very popular in here, heh?
No one has said anything against Bill Joy; when it was written csh was an improvement for interactive use, but not for scripting.
Quote:
Thanks for believing in me, but you've made me even more anxious to find out the answer
What makes you think there is an answer in csh. Some things simply cannot be done in csh.
Have you read this article? Escpecially note item no. 5!
Top Ten Reasons not to use the C shell
9 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
can some tell me how to do this. I mean, i tried finding this out on my own but when I checked the man pages, i got a truckload of commands available pertaining to this task which in turn got me confused.
so my question is, if there is a simple straight forward(not necessarily easy) way to... (2 Replies)
Discussion started by: TRUEST
2 Replies
2. Shell Programming and Scripting
hello, i have a lot of pcap files (tcpdump output) that i want to compare.
every tcpdump output has two file, server and client.
what i want to do is:
1. take timestamp, source address, destination address, and packet id from each file (server and client)
2. find the packets sent from... (0 Replies)
Discussion started by: slumpia
0 Replies
3. AIX
I have received errpt like this.Any help will be highly appreciated.Recently my application has been migrated to aix 5.3 and working fine in aix 5.2 with out crashes.
LABEL: CORE_DUMP
IDENTIFIER: C69F5C9B
Date/Time: Thu Apr 23 09:41:29 EDT 2009
Sequence Number: 948... (3 Replies)
Discussion started by: kittu1979
3 Replies
4. Emergency UNIX and Linux Support
We have a binary that generates coredump. So I ran the gdb command to analyze the issue. Pleae note the binary and code are in two different locations and we cannot build the whole binary using debugging symbols. Hence how and what details can I find from below backtarce:
gdb binary corefile
... (5 Replies)
Discussion started by: uunniixx
5 Replies
5. UNIX and Linux Applications
Is/Are there an/some application/applications , package/packages for benchmarking or system performance measuring which are there for almost all Linux releases and distributions? (2 Replies)
Discussion started by: nixhead
2 Replies
6. UNIX for Dummies Questions & Answers
Hi List,
Could someone please point me into the right direction with the following:
I have a file containing a list of street addresses.
I need to sort all the street addresses with the same number to a new file containing the street name and corresponding number.
So:
Strawinskylaan... (3 Replies)
Discussion started by: M474746
3 Replies
7. AIX
Hi Admins,
I need your help to analyze the cpu usage of our main server. I have shared below, CPU usages during busy hours and non busy hours.
CPU usage is always full at busy hours. Users always complaints about slowness. This server is a lpar partition and configured as uncapped mode.
... (7 Replies)
Discussion started by: newaix
7 Replies
8. Programming
Hello,
I was reading Heuritics text and came across an algorithm below. Finding hard to analyze it can any one help me out below...
How to analyze if I take say no. of types are 5 and each type has say 20 coins.
thanks.
Let {c1, c2...cn=1} be a set of distinct coin types where ci is... (1 Reply)
Discussion started by: sureshcisco
1 Replies
9. Homework & Coursework Questions
Florida State University, Tallahassee, FL USA, Dr. Whalley, COP4342
1. The problem statement, all variables and given/known data:
Create a lex specification file that reads a C source program that ignores keywords and collects all identifiers (regular variable names) and also displays the line... (3 Replies)
Discussion started by: D2K
3 Replies
LEARN ABOUT DEBIAN
shell-quote
SHELL-QUOTE(1p) User Contributed Perl Documentation SHELL-QUOTE(1p)
NAME
shell-quote - quote arguments for safe use, unmodified in a shell command
SYNOPSIS
shell-quote [switch]... arg...
DESCRIPTION
shell-quote lets you pass arbitrary strings through the shell so that they won't be changed by the shell. This lets you process commands
or files with embedded white space or shell globbing characters safely. Here are a few examples.
EXAMPLES
ssh preserving args
When running a remote command with ssh, ssh doesn't preserve the separate arguments it receives. It just joins them with spaces and
passes them to "$SHELL -c". This doesn't work as intended:
ssh host touch 'hi there' # fails
It creates 2 files, hi and there. Instead, do this:
cmd=`shell-quote touch 'hi there'`
ssh host "$cmd"
This gives you just 1 file, hi there.
process find output
It's not ordinarily possible to process an arbitrary list of files output by find with a shell script. Anything you put in $IFS to
split up the output could legitimately be in a file's name. Here's how you can do it using shell-quote:
eval set -- `find -type f -print0 | xargs -0 shell-quote --`
debug shell scripts
shell-quote is better than echo for debugging shell scripts.
debug() {
[ -z "$debug" ] || shell-quote "debug:" "$@"
}
With echo you can't tell the difference between "debug 'foo bar'" and "debug foo bar", but with shell-quote you can.
save a command for later
shell-quote can be used to build up a shell command to run later. Say you want the user to be able to give you switches for a command
you're going to run. If you don't want the switches to be re-evaluated by the shell (which is usually a good idea, else there are
things the user can't pass through), you can do something like this:
user_switches=
while [ $# != 0 ]
do
case x$1 in
x--pass-through)
[ $# -gt 1 ] || die "need an argument for $1"
user_switches="$user_switches "`shell-quote -- "$2"`
shift;;
# process other switches
esac
shift
done
# later
eval "shell-quote some-command $user_switches my args"
OPTIONS
--debug
Turn debugging on.
--help
Show the usage message and die.
--version
Show the version number and exit.
AVAILABILITY
The code is licensed under the GNU GPL. Check http://www.argon.org/~roderick/ or CPAN for updated versions.
AUTHOR
Roderick Schertler <roderick@argon.org>
perl v5.8.4 2005-05-03 SHELL-QUOTE(1p)