Search Results

Search: Posts Made By: cielle
Forum: AIX 04-15-2014
6,589
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
2,966
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,681
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,681
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,079
Posted By Scott
So "$PWD" is literal? sed -i...
So "$PWD" is literal?


sed -i "s|\$PWD|....
Forum: Red Hat 03-27-2012
33,079
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,079
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.
Showing results 1 to 7 of 7

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