10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I am trying to echo a variable exactly to a script-
echo "${var1} ${var2} >> output.output
Gives me a blank file.
I would like output.output to basically say:
${var1} ${var2}
I think I need to use a special escape character for variables. Am I right in assuming that, and is it the... (8 Replies)
Discussion started by: jeffs42885
8 Replies
2. Shell Programming and Scripting
Hi,,
I have the line below in a file:
$!VarSet |LFDSFN1| = '"E:\APC\Trials\20140705_427_Prototype Trial\Data\T4_20140705_Trial_Cycle_Data_13_T_Norm.txt" "VERSION=100 FILEEXT=\"*.txt\" FILEDESC=\"General Text\" "+""+"TITLE{SEARCH=NONE NAME=\"New Dataset\" LINE=1I want to write a script to change... (2 Replies)
Discussion started by: carlr
2 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. UNIX for Advanced & Expert Users
Hi
just for regular use i m working on small module written in perl for getting date in specified format like i have to specify date format and then seperator to seperate date i am 95% done. now i m sure explanation i gave is not good enough so i am putting output here :
C:\Documents and... (2 Replies)
Discussion started by: zedex
2 Replies
6. Shell Programming and Scripting
Hello there,
I have a bit of dirty delimited file, I mentioned dirty because, the delimiter can also appear in wrong positions. However, one uniqueness of this file is
whenever the delimiter appear inside the double quote, then do not consider as delimiter, if it appear outside double then... (8 Replies)
Discussion started by: brainyoung
8 Replies
7. UNIX for Dummies Questions & Answers
// AIX 5.3
I am trying to use .sh after changing it to .ksh
Obviously, it doesn't like the file extension change.
I am seeing a lot of odd characters (^M) like below:
Init_Part2 ()^M^M
{^M^M
AWTRACE "AW SET"^M^M
set | grep -e CFG_ -e OUTDIR_ENV^M^M
AWTRACE "AW SET"^M^M
^M^M
if ;... (2 Replies)
Discussion started by: Daniel Gate
2 Replies
8. Shell Programming and Scripting
Hi,
I did the below.
$ print "\\n"
$
I am curious, why does \\n give two new lines? I would have thought that the first \ would escape the second \, and so we'd get \n printed. But we didn't.
Any ideas?
Thanks. (7 Replies)
Discussion started by: JamesByars
7 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