10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
I'm here again asking for your precious help.
I'm writing some code to convert csv files to html.
I want to highlight header and also I want to have rows with alternate colors.
So far this is my work###Let's format first line only with some color
cat $fileIN".tmp1" | sed '1... (7 Replies)
Discussion started by: emare
7 Replies
2. Shell Programming and Scripting
I want to get the last character from my machine name using the following code, the default shell is bash, the script runs in ksh.
I get 'bad' substitution error on running the script, but works fine if run using dot and space.
Why?
$ echo $0
bash
$ cat -n myenv.sh
1 ... (8 Replies)
Discussion started by: ysrini
8 Replies
3. Shell Programming and Scripting
friends,
I have a situation where i am using a $RANDOM function along with the filename, I want this to be escaped by the OS in the first assignment (works as expected) and executed in the second assignment (does not execute $RANDOM)
filename1=filename1_\$RANDOM
echo $filename1... (3 Replies)
Discussion started by: Balaji M
3 Replies
4. Shell Programming and Scripting
Please explain why this works. Am unable to find another definition for the '%', which would explain this behaviour:
spaceLeft=`df -h /myPartition | tail -1`
# output looks like: /dev/sda5 10G 1.2G 12G 29% /
set -- $space
#this deletes the trailing '%' sign, which is... (6 Replies)
Discussion started by: frododot
6 Replies
5. Shell Programming and Scripting
Hi Gurus,
I am working with a korn shell script. I should replace in a very great file the character ";" with a space.
Example:
2750;~
2734;~
2778;~
2751;~
2751;~
2752;~
what the fastest method is? Sed? Awk?
Speed is dead main point, Seen the dimensions of the files
Thanks (6 Replies)
Discussion started by: GERMANICO
6 Replies
6. UNIX for Dummies Questions & Answers
Sorry to bug you, but my sed is failing me,
I have a file auto generated from abinitio, it has a string of chars ending with a line break, and then it has added a ^A character, I can remove this is vi by using the following %s/^A//g (where ^A is ctrl v and control A), however when I try to sed... (1 Reply)
Discussion started by: badg3r
1 Replies
7. Shell Programming and Scripting
Help needed - I am sure there is something to do with tabs or white space that is killing me here..
I have a file that is generated from an oracle sql script - when I cat the file I see the below
601888725 14-AUG-08-10:20 3
601888726 14-AUG-08-10:37 ... (4 Replies)
Discussion started by: frustrated1
4 Replies
8. Shell Programming and Scripting
Hi All,
In ksh script i'm trying to assign "sqlstmt1" varaible value,
update VAREntryTb set VAR10num = VAR1num * Mltplr where BusD = '$val1' and RunI = 1"`
Hence i wrote below statement, the issue with this is shell is expanding "*" character adn thus subistuting it with the content of my... (6 Replies)
Discussion started by: arvindcgi
6 Replies
9. Shell Programming and Scripting
Hey all.
Easy question.
I have a (ksh) varaible x. It contains the following (for example): N557788
I want to replace the "N" with a "-".
I've done this before but for the life of me I cannot remember how I did it.
Thanks.
mtw (2 Replies)
Discussion started by: mixxamike
2 Replies
10. Shell Programming and Scripting
Newline character "\n" not working for ksh in linux AS 3.0
Command :
$echo "Hi\nHi"
$Hi\nHi
$
Expected output :
$echo "Hi\nHi"
Hi
Hi
$
Can some help me on this
Thanks in advance
Sanish. (11 Replies)
Discussion started by: sanikv
11 Replies