Search Results

Search: Posts Made By: cielle
Forum: AIX 04-15-2014
6,614
Posted By rbatte1
Hello cielle, Have you searched the board...
Hello cielle,

Have you searched the board for date & time functionality? There are several threads that should lead you to what you want to do.


On the flip side, being AIX you can mess about...
Forum: Red Hat 03-29-2012
3,018
Posted By Corona688
PWD is the directory the program was run from --...
PWD is the directory the program was run from -- not the same thing as "whatever directory my program is in". You can do cd / ; /absolute/path/to/my/program.sh to run a program inside...
Forum: Red Hat 03-28-2012
1,687
Posted By cero
What shell do you use? In case of bash there are...
What shell do you use? In case of bash there are some nice string manipulation features:

maindir=/opt/xSystem/config
upOneDir=${maindir%/*}
echo $upOneDir
/opt/xSystem
Forum: Red Hat 03-28-2012
1,687
Posted By ningy
echo $mainder |awk -F/ '{gsub($NF,"");print}'...
echo $mainder |awk -F/ '{gsub($NF,"");print}' |sed 's/.$//'
Forum: Red Hat 03-27-2012
33,279
Posted By Corona688
Variables do not expand in single-quotes: $...
Variables do not expand in single-quotes:

$ echo '$PWD'
$PWD

$ echo "$PWD"
/home/username

$

So put your sed expression in double quotes "" instead of single-quotes.
Forum: Red Hat 03-27-2012
33,279
Posted By Scott
To repeat: Change the quotes to double...
To repeat:



Change the quotes to double quotes. You can escape the inner double quotes with \.

It's also not great to use / as the what-dya-call-it when dealing with paths.


sed -i...
Forum: Red Hat 03-27-2012
33,279
Posted By Scott
So "$PWD" is literal? sed -i...
So "$PWD" is literal?


sed -i "s|\$PWD|....
Showing results 1 to 7 of 7

 
All times are GMT -4. The time now is 07:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy