04-17-2007
Quote:
Unforutnately, when trying to type this command I can only get to the "CTRL M" before I get the error message "Substitute pattern match failed." Does anyone know why I cannot type the whole command shown above or is there something that cause the command to execute before the entire command is typed?
Am surprised, why that happens!
Definitely you would be able to do that!
I tried and it works ( I doubt the ctrl -v and ctrl - m )
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
countA=`awk '/X/''{print substr($0,38,1)}' fName | wc -l`
countB=`wc -l fName | awk '{print int($1)}'`
echo > temp
ratio=`awk -va=$countA -vc=$countB '{printf "%.4f", a/c}' temp`
After running script for above I am getting an error as :
awk: 0602-533 Cannot find or open file -vc=25.
The... (3 Replies)
Discussion started by: videsh77
3 Replies
2. AIX
Following code is working in bash but not in ksh.
Can someone please send me an alternative?
#!/bin/ksh
fname="EOA.dmp"
echo $fname
logname=${fname/.dmp/.log}
echo $logname
I am getting below error in ksh
"testcmd: logname=${fname/.dmp/.log}: 0403-011 The specified substitution is not... (2 Replies)
Discussion started by: arsheshadri
2 Replies
3. Solaris
Hi,
Following code is working in bash but not in ksh.
Can someone please send me an alternative?
#!/bin/ksh
fname="EOA.dmp"
echo $fname
logname=${fname/.dmp/.log}
echo $logname
I am getting below error in ksh
"testcmd: logname=${fname/.dmp/.log}: 0403-011 The specified substitution... (3 Replies)
Discussion started by: arsheshadri
3 Replies
4. UNIX for Advanced & Expert Users
I cannot seem to get this text file to format. Its as if the awk statement is being treated as a simple cat command.
I manned awk and it was very confusing. I viewed previous posts on this board and I got the same results as with the
the awk command statement shown here. Please help.
... (6 Replies)
Discussion started by: tekline
6 Replies
5. Linux
i am not able to install solaris 10
i have installed solaris many times succesfully with wotking network
after that abrupt power failure i was never able to start solaris and neither install during install it hangs
IS IT PROBABLE THAT BIOS OR SOME OTHER SETTINGS RELATED TO HARDWARE IS... (0 Replies)
Discussion started by: simaich8
0 Replies
6. UNIX for Dummies Questions & Answers
I know this script is crummy, but I was just messing around.. how do I get sed's insert command to allow variable expansion to show the filename?
#!/bin/bash
filename=`echo $0`
/usr/bin/sed '/#include/ {
i\
the filename is `$filename`
}' $1
exit 0 (8 Replies)
Discussion started by: glev2005
8 Replies
7. UNIX for Dummies Questions & Answers
Hey, guys!
Trying to research this is such a pain since the read command itself is a common word. Try searching "unix OR linux read command examples" or using the command substitution keyword. :eek:
So, I wanted to use a command statement similar to the following.
This is kinda taken... (2 Replies)
Discussion started by: ProGrammar
2 Replies
8. Shell Programming and Scripting
Hi I'm using ksh.
And i'm trying to get the substring like below.
but giving the following error
#!/bin/ksh
foo=teststring
bar=${foo:0:5}
echo $bar
And the error is
./sbstr_test.sh: bar=${foo:0:5}: bad substitution
what is wrong in this script. Please correct me
... (3 Replies)
Discussion started by: smile689
3 Replies
9. Shell Programming and Scripting
Hi Gurus,
Not able to catch what's going wrong here. I just want to get output as "tree".
server:/mk/app/nexapp $ echo $SHELL
/usr/bin/ksh
server:/mk/app/nexapp $ export db_name1="tree"
server:/mk/app/nexapp $ export i=1
1st try:
server:/mk/app/nexapp $ echo $(db_name$i)
ksh: db_name1: ... (3 Replies)
Discussion started by: mukesh.lalwani
3 Replies
10. Shell Programming and Scripting
I am trying add a prefix variable(string) to command output.
sed parameter substitution is not working.
- I have found some issues on my end of testing,, please delete this thread for now. (1 Reply)
Discussion started by: kchinnam
1 Replies
LEARN ABOUT DEBIAN
fiu-ctrl
fiu-ctrl(1) General Commands Manual fiu-ctrl(1)
NAME
fiu-ctrl - a script to remote control programs using libfiu
SYNOPSIS
fiu-ctrl [options] PID [PID ...]
DESCRIPTION
fiu-ctrl is a script to enable/disable failure points in running programs that are using libfiu(3).
Programs are usually launched using fiu-run(1), which enables libfiu's remote control capabilities without the need to modify the program's
code.
For additional documentation, go to the project's website at http://blitiri.com.ar/p/libfiu.
OPTIONS
-c command
Run the given libfiu remote control command before executing the program (see below for reference).
-f ctrlpath
Set the default prefix for remote control over named pipes. Defaults to "$TMPDIR/fiu-ctrl", or "/tmp/fiu-ctrl" if "$TMPDIR" is not
set, which is the usually correct for programs launched using fiu-run(1).
Remote control commands are of the form "command param1=value1,param2=value2". Valid commands are:
'enable name=NAME'
Enables the NAME failure point unconditionally.
'enable_random name=NAME,probability=P'
Enables the NAME failure point with a probability of P.
'disable name=NAME'
Disables the NAME failure point.
All of the enable* commands can also optionally take failnum and failinfo parameters, analogous to the ones taken by the C functions.
EXAMPLES
The following command will tell the process running with PID 12345 to enable the failure point posix/io/read with a 25% of probability to
fail, and the failure point libc/mm/malloc with a 5% of probability to fail:
fiu-ctrl -c 'enable_random name=posix/io/*,probability=0.25'
-c 'enable_random name=libc/mm/*,probability=0.05' 12345
And the following will tell the same process to disable the previously enabled failure point posix/io/read:
fiu-ctrl -c 'disable name=posix/io/read' 12345
SEE ALSO
libfiu(3), fiu-run(1).
BUGS
If you want to report bugs, or have any questions or comments, just let me know at albertito@blitiri.com.ar. For more information about
libfiu, you can go to http://blitiri.com.ar/p/libfiu.
16/Jun/2009 fiu-ctrl(1)