10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to pass variable to below awk statement
awk '/abc123/{x=NR+1}(NR<=x){print}' sftp_log_20150317.log
I tried -v like below, but its not working. Please help!!!
awk -v var1="abc123" '/var1/{x=NR+1}(NR<=x){print}' sftp_log_20150317.log
Input file is:
sftp_log_20150317.log
... (3 Replies)
Discussion started by: vegasluxor
3 Replies
2. Shell Programming and Scripting
I am facing a very strange issue. I have script in ksh with #!/bin/ksh as shebang.
This script has function which sets the env variable before running other functions of the script. by
set_up_env()
{
CONFIG_FILE="/opt/app/tools/deepmarking/latestVersion/script/UploadEnv"
if
then
... (7 Replies)
Discussion started by: Tuxidow
7 Replies
3. UNIX for Dummies Questions & Answers
Hi ,
Below is the content of my .profile
$cat .profile
# Workstation users: Make changes to your .profile file in your home dir.
. /.profile
set -o vi
PS1=$
But anytime I login I have to source "set -o vi" separately.Please suggest (8 Replies)
Discussion started by: ramesh12621
8 Replies
4. Shell Programming and Scripting
Hello Everyone,
I'm still trying to grasp many concepts in .ksh scripting, one of them being variables inside loops. My problem is the following:
* I'm trying to set a variable inside a while read loop to reuse it outside of said loop. My lines are the following :... (13 Replies)
Discussion started by: jimmy75_13
13 Replies
5. Shell Programming and Scripting
Hi ,
I am having one TCL TK script , I am setting some variables in the GUI TK interface
set DI 1
set MODELS_PATH /a/d/path
but I want to make ksh shell understand the variables when I am running TK script
I tried to do like this
set a
but it is not working
... (1 Reply)
Discussion started by: kshitij
1 Replies
6. Shell Programming and Scripting
Hi,
I have problem setting up environmental variables.
The idea is to start with main.ksh script that will run setting.ksh, and in side of it I'll set up variables.
Please take a look at my code, and help me to find my mistake.
Thanks,
Mila
Main.ksh look like this:
#!/usr/bin/ksh
#... (2 Replies)
Discussion started by: mefquik
2 Replies
7. Shell Programming and Scripting
ih all,
info=$(get_Info $daemon)
# $info give :
# "ev20 8800 TTIOGC 12345 astos EDITEUR 0 0 . ."
server=$(echo $info | cut -d" " -f1)
port=$(echo $info | cut -d" " -f2)
dname=$(echo $info | cut -d" " -f3)
dport=$(echo... (1 Reply)
Discussion started by: wolfhurt
1 Replies
8. Shell Programming and Scripting
set filename $logDir/PyLog/$logname
echo $filename >> logname.txt
I am trying to write to write the varibale filename into a file logname.txt,it is not working could any one suggest y (2 Replies)
Discussion started by: nathgopi214
2 Replies
9. UNIX for Advanced & Expert Users
Today I logged as root on my HP-UX server and by mistake executed below command
# ksh -i vi
Then onwards for every root logging the ksh shell giving wired output to every command
e.g
# ls
kÚ
.brw_history
.brwpause
.brwtmp
: : :
1+~H4p+À+~KÑ
1+Ðè
d
15kÚ
1d+~èYÑd:ðè½h|À+~èY4:àh|À+
And so... (6 Replies)
Discussion started by: zing_foru
6 Replies
10. Shell Programming and Scripting
Hi,
I have a program that searches for a particular string patten. I am however having difficulty passing the varible $i (in a loop) as the string pattern to replace. Using either perl or sed search and replace statements, I get the same kinda result. For example, using the perl:
for i in... (3 Replies)
Discussion started by: Breen
3 Replies