10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
grt=`sort -nr line_count.txt|head -1`
while read $dline
do
if $grt" -eq "`wc -l combo_operncount.$dline|awk '{print $1}'`" ]
then
awk -F, '{print $1}' combo_operncount.$dline > FULLD7
else
echo combo_operncount.$dline >> filecoll.txt
fname=`cat filecoll.txt|tr -s "\n" " "`
echo $fname... (6 Replies)
Discussion started by: nikhil jain
6 Replies
2. Shell Programming and Scripting
Hi All,
I'm building a new shell script but i'm facing a problem with one line which is giving "bad substitution" error. Please assist
script lines:
#!/bin/sh
printf "%s: " "Occurrence DATE (YYYYMMDD)"; read DATE
shortdate=${DATE#??}
o/p:
./test1: bad substitution
This command is... (2 Replies)
Discussion started by: Dendany83
2 Replies
3. Shell Programming and Scripting
Hello,
In bash I can use the following:
TMP=12345
MID=${TMP:1:1}
the expected result is: 2
but when using KSH I'm getting a ''bad substitution" error.
What is the correct syntaxin ksh?
Thanks (2 Replies)
Discussion started by: LiorAmitai
2 Replies
4. Shell Programming and Scripting
hi,
i created a shell script having the following content:
#! /usr/bin/ksh
FROM="myemail@domain.com"
MAILTO="someemail@domain"
SUBJECT="TEST"
BODY="/export/home/adshocker/body.txt"
ATTACH="/export/home/adshocker/attach.prog"
echo $ATTACH
ATTACH_NAME="${ATTACH##*/}"
echo $ATTACH_NAME... (5 Replies)
Discussion started by: adshocker
5 Replies
5. Solaris
Dear All
i am getting "bad substituion" error in the follwing piece of code when i run from crontab.however it works if i run directly from my machine.
#!/bin/bash
for i in `cat abc`
do
part1=${i:0:12} ;
part2=${i:13:27} ;
echo "$part1,$part2">> def
done (1 Reply)
Discussion started by: asadlone
1 Replies
6. UNIX for Advanced & Expert Users
when i say
$crontab z
it says ==>
"z":6: bad minute
"z":6: bad minute
errors in crontab file, can't install.
any clue why its happening? (1 Reply)
Discussion started by: crackthehit007
1 Replies
7. Ubuntu
Hi,
Iam trying to run a gmake command and have the latest version of Gnu in my redhat linux system.
I need to execute the following steps;
---> chmod +x utils/*
---> ./utils/AllCodeManagerFix
---> gmake LINUX
Iam able to do the chmod command but when I run the second command I get... (2 Replies)
Discussion started by: viji19812001
2 Replies
8. Programming
Dear Experts,
I have been suffering in porting a CFD code called OpenFOAM to sgi-IRIX system for many months but to no avail, and the problem is about MPI!
I installed gcc-4.3.0, gnu-binutils for my compilation.
And after the building process, I can run the executive with single CPU, but when... (1 Reply)
Discussion started by: lakeat
1 Replies
9. HP-UX
Hello,
i am having b2000 hp- visulized matchine, which i am using as server, i booted in maintanance mode and increased root file system lvm, after reboot i can not boot system and getting "bad LIF magic error", i tried to installed O/S again (hpux 10.20 ro hpux 11) but i can not installed its... (0 Replies)
Discussion started by: arvijain
0 Replies
10. UNIX for Advanced & Expert Users
What is wrong with my syntax, I am getting bad number error. The following lines of code get the value from INI file but the variable is a combination of multiple variables. When compiling all together, I get a bad number error or changing the '((' with '{{' gets me bad substitution error. The... (2 Replies)
Discussion started by: moan71
2 Replies