10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I am using the below script which has awk command, but it is not returing the expected result. can some pls help me to correct the command.
The below script sample.ksh should give the result if the value of last 4 digits in the variable NM matches with the variable value DAT. The... (7 Replies)
Discussion started by: G.K.K
7 Replies
2. Shell Programming and Scripting
Hello all. This is my first post/question on this site.
I’m a new Systems Analyst with previous experience with BASH. Although now I'm using AIX, and I’m trying to get a feel for the Korn shell (for those of you that don’t know AIX only uses the KORN shell).
I hope I put this into the correct... (10 Replies)
Discussion started by: sydox
10 Replies
3. UNIX for Dummies Questions & Answers
Hello people.
Part of my script:
SUBSETID=`echo $PMFILE |sed 's/pmresult_//' | sed 's/_*//'`
MAPFILE=`find /huawei/cell /huawei/nodeb /huawei/rnc -name 'mapping_$SUBSETID.txt' |grep -v backup`
Unfortunatelly variable $SUBSETID in the MAPFILE declaration will not return the... (3 Replies)
Discussion started by: drbiloukos
3 Replies
4. Shell Programming and Scripting
Hello All,
I don't write scripts very often, and in this case I am stumped, although it may be a bug in the version of bash I have to use (it's not my system).
I want to extract a specific string snippet from a block of text (coming from a log file) that is dependent on a bunch of other... (1 Reply)
Discussion started by: jaimielives
1 Replies
5. Shell Programming and Scripting
Hi,
I am trying to do the following thing
var='date'
$var
Above command substitutes date for and in turn runs the date command and i am getting the todays date value.
I am trying to do the same thing as following, but facing some problems,
unique_host_pro="sed -e ' /#/d'... (3 Replies)
Discussion started by: gvinayagam
3 Replies
6. Shell Programming and Scripting
When script is running you only see when some of the commands are not successfull.
Is there a way to see which command are executed and to show the substitution of variables as every line is executed ? (3 Replies)
Discussion started by: gr0124
3 Replies
7. 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
8. Shell Programming and Scripting
I want to instert Category:XXXXX into the 2. line
something like this should work, but I have somewhere the wrong sytanx. something with the linebreak goes wrong:
sed "2i\\${n}Category:$cat\n"
Sample:
Titel Blahh Blahh abllk sdhsd sjdhf
Blahh Blah Blahh
Blahh
Should look like... (2 Replies)
Discussion started by: lowmaster
2 Replies
9. Shell Programming and Scripting
file1.ksh
#!/bin/ksh
test5_create="I am a man" # test5 will be dynamic and the value will be passed from command line
a=${1}_create
echo $a # i need the output as "I am a man"
./file1.ksh test5 # i run the script like this
any suggessions guys... (1 Reply)
Discussion started by: giri_luck
1 Replies
10. Shell Programming and Scripting
Hello,
i have another sed question.. I'm trying to do variable substition with sed and i'm running into a problem.
my var1 is a string constructed like this:
filename1 filerev1 filepath1
my var2 is another string constructed like this:
filename2 filerev2 filepath2
when i do... (2 Replies)
Discussion started by: alrinno
2 Replies