I tried out but I think only grep worked for me. The $FILE would modify original file, I think so, but I want the results to be stored separate without affecting the source txt files in the folder. I think it is good.
---------- Post updated 08-14-12 at 12:19 AM ---------- Previous update was 08-13-12 at 11:43 PM ----------
I think the code below gives exactly what I need. Thanks!
Hi
my shell is tcsh
can I have functions in my shell scripting?
Is the below shell script correct.
Can I have two functions and call one of them as required.
----------
echo "functions"
f1
f1 ()
{ echo "hello" }
f2 () (1 Reply)
Hi,
First I will tell my objective of this function (function one).
I have a table for ex:
id passwd name
-- ------ -----
1 fdhgfs werwer
2 fsdfs sdfsdf
3 sdfs sdfsdf
4 fdsfs dssdf
. . .
.
.
.
The id, passwd and name are the arguments for another function say two. (1 Reply)
Hi,
I have a function that hold 3 arrayies.
I need to pass them to another function as an input, for further use
Could you please explain how to do that.
Thanks (5 Replies)
PHP question...
I have an SQL query that's pulled back user IDs as a set of columns. Rather than IDs, I want to use their names.
So I have an array of columns $col with values 1,7,3,12 etc and I've got an array $person with values "Fred", "Bert", "Tom" etc
So what I want to do is display the... (3 Replies)
I have korn shells where I want to create a function passing $1 to a function , determine my $STAT_ENV value, set the paths and return
the paths for STATSH,STATPRM,STATSQR,STATSQL,STATCTL TO BE USED IN THE UNIX SCRIPT THE CALLED THE fucnction in the first place.
Can someone tell me the best... (2 Replies)
I'm semi new to unix/linux and am trying to convert a program I wrote in C++ to a bash script. It's a program that prints Fibonacci's series. I have found scripts that will do it, but I'm trying persistently to get this one to work. The problem occurs when I try to return a value from the function.... (3 Replies)
Hi,
I am exploring with defining functions in my BASH shell scripts. However, I am bit confused about how to pass parameters to my functions. I was under the impression that you must do something like the following:
Define a function called "sample_function":
function sample_function {... (3 Replies)
Hi, im making a little script but need some help
Code i have so far is
read -p 'Bot Nickname:' ecnick
read -p 'Bot Username:' ecusername
read -p 'Bot Realname:' ecrealname
read -p 'Your Email:' ecemail
echo ''
echo Your bots nickname is set to $ecnick
echo Your bots username is set to... (2 Replies)
if i declare both but don't input any variables what values will the int array and file pointer array have on default, and if i want to reset any of the elements of both arrays to default, should i just set it to 0 or NULL or what? (1 Reply)
I have 7 functions those need to be executed as command line inputs, I tried with below code it’s not executing function. If I run the ./script 2 then fun2 should execute , how to initiate that function I tried case and if else also, how to initiate function from command line
if
then... (8 Replies)
Discussion started by: saku
8 Replies
LEARN ABOUT PLAN9
index
0intro 0intro intro 0intro 2a 2a 6a 2a 8a 2a ka 2a va 2a xa 2a 2c2c 6c 2c 8c 2c kc 2c vc 2c xc 2c 2l 2l 6l 2l 8l 2l kl 2l vl 2l xl2l 81/2 81/2 label 81/2 window 81/2 wloc 81/2 acid acid acme acme
awd acme win acme 8al alef alef alef kal alef val alef ar ar artart art2pic art ascii ascii unicode ascii awk awk basename base-name bc bc bind bind mount bind unmount bind bundle bundle c++c++ c++/2c c++ c++/2l c++ c++/8c c++ c++/8l c++ c++/kc c++ c++/kl
c++ c++/vc c++ c++/vl c++ cal cal calendar calendar cat cat read
cat char char rschar char 1/2char char chgrp chgrp chmod chmod
cmp cmp comm comm con con cu con rx con telnet con xmr con xmscon cp cp mv cp cpp cpp cpu cpu date date db db dc dc dd dd dela-tex deroff deroff deroff diff diff doctype doctype du du echoecho ed ed emacs emacs eqn eqn factor factor primes factor filefile fmt fmt fone fone fortune fortune freq freq 4s games 5s
games ana games catclock games clock games festoon games fire-works games fsim games games games life games mandel games plumbgames smiley games swar games grap grap graph graph grep grep gsgs hoc hoc hp hp join join broke kill kill kill ktrans ktrans lexlex look look lp lp lc ls ls ls aliasmail mail edmail mail mailmail seemail mail sendmail mail smtp mail smtpd mail to mail vis-mon mail vwhois mail lookman man man man mc mc membername mk mkmk mkdir mkdir mothra mothra netstat netstat news news nm nm p p
page page netkey passwd passwd passwd pcc pcc pic pic tpic picplot plot ppp ppp pppclient ppp pppserver ppp pr pr kprof profprof prof proof proof ps ps psu ps pbd pwd pwd pwd cd rc eval rcexec rc exit rc flag rc rc rc rfork rc shift rc wait rc whatis rc
~ rc rm rm B sam sam sam sam.save sam sed sed seq seq size size
sleep sleep sort sort spell spell sprog spell spin spin split
split start stop stop stop strings strings strip strip md5sum sumsum sum syscall syscall tail tail 32vfs tapefs cpiofs tapefstapefs tapefs tapfs tapefs tarfs tapefs tpfs tapefs v10fs tapefs
v6fs tapefs tar tar tbl tbl tcs tcs tee tee iwhois tel tel teltest test bibtex tex dvips tex dviselect tex latex tex mf tex textex time time touch touch tr tr nroff troff troff troff tweaktweak twig twig uniq uniq units units ki vi vi vi xi vi wc wc whowho whois who xd xd yacc yacc yesterday yesterday