The UNIX and Linux Forums
Forum Home
Linux and Unix Man Pages
Search Forums
Search Community Posts
Today's Posts
Quick Links
Man Pages
RedHat Commands
OpenSolaris Commands
Linux Commands
SunOS Commands
FreeBSD Commands
All UNIX Man Pages
All Linux Man Pages
Full Man Repository
Login or Register to Ask a Question and Join Our Community
Search Forums
Show Threads .
Show Posts
Tag Search
Advanced Search
Quick Links
Contact Us
Forum Rules
Today's Posts
FAQ
Pictures & Albums
All Albums
Miscellaneous
What is My IP
Whois
Mark Forums Read
Search Results
Showing results 1 to 7 of 7
Search took
0.01
seconds.
Search:
Posts Made By:
cielle
Forum:
AIX
04-15-2014
1
AIX DateTime Computation
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
4
Unable to get $PWD value from script in /etc/init.d
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
5
Get up one directory of location as variable
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
5
Get up one directory of location as variable
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
6
How to pass value of pwd as variable in SED to replace variable in a script file
33,284
Posted By
Scott
So "$PWD" is literal? sed -i...
So "$PWD" is literal?
sed -i "s|\$PWD|....
Forum:
Red Hat
03-27-2012
6
How to pass value of pwd as variable in SED to replace variable in a script file
33,284
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
6
How to pass value of pwd as variable in SED to replace variable in a script file
33,284
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
Member Badges and Information Modal
×