10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
$BIN/sql.py "select * from reporting.V_AMSNB_OPT_PB_LOAD" | sed -n "2,$ p" | sed "s/ /,/g" > $DATADIR/OPT_PB_LOAD_AMSNB.csv
if
The processes that get created from the above code gets stuck...as in the processes get created but then never completes. (or at least we assume it never completes... (1 Reply)
Discussion started by: mimiyj
1 Replies
2. Shell Programming and Scripting
Hi,
I am using sed command to extract data from my log file for a certain time interval. From and To "time" are my input arguments.
Now if i use the sed command on command line. I get the desired results and If i use it in script.It fails.
sed command as command line:
sed -n '/04-Mar-2015... (6 Replies)
Discussion started by: oberoi1403
6 Replies
3. Shell Programming and Scripting
I have this script to parse some logs:
#!/bin/bash
id=$1
shift
sed "/(id=$id)/,/^$/!d" "$@"
Usage: ./script.sh 1234 logfile
The logs have an empty line before the logged events/timestamps -- most of the time. And this is my issue, since when there is no empty line, it will catch things... (4 Replies)
Discussion started by: KidCactus
4 Replies
4. Shell Programming and Scripting
Hi All,
I am beginner in scripting. I wrote a simple script to perform some task. It seem to have some error in command line,
Kindly somebody help.
Thanks
#!/bin/bash
date
cd /home/poojasaxena/Desktop/CMS/script/DataMCMatch
function pause(){
read -p "$*"
}
FILE=$1... (22 Replies)
Discussion started by: nrjrasaxena
22 Replies
5. Shell Programming and Scripting
I have a irritating problem with a "if"-statement or what you should call it, in sed. I would love some help here since I am very, very stuck.
I have this statement that I want to do:
if line contains a:
do this
if none of the lines contained a:
do this
The problem with this... (8 Replies)
Discussion started by: hjalle
8 Replies
6. Shell Programming and Scripting
Hi All
I have script that find 777 dir with specific extension like .php .Now after finding all 777 directory i will place in httpd.conf using a directory directive ,Now i was not do that,if directory entry exitst in httpd.conf then script ignor it dont show me at stdout else if it dont find... (2 Replies)
Discussion started by: aliahsan81
2 Replies
7. UNIX for Dummies Questions & Answers
Hi There
I am pretty new to UNIX and have only been using it from a basic point of view,I now want to start using it and learning more , have got a whole lot of books and documentation from the web and am slowly learning.I have written a get script in windows :-
lcd E:\MAIN\PRO\FILES\MAINDB... (1 Reply)
Discussion started by: FOCKER
1 Replies
8. Shell Programming and Scripting
I have a loop in a script that is given me an error but, when I do it on the command line it works perfectly. The sed statement has to use the variables from a file so the file is partitioned correctly. I am running on HP:
<Begin error>:
+ cat /u01/bteam/CNAM/1121/.partition
+ read line
+ +... (3 Replies)
Discussion started by: bthomas
3 Replies
9. Shell Programming and Scripting
hey i am a bit stuck here. i just started work experience and i need to create a simple script which delete all files in a specify folder which are older then 2 days.
:mad: i tried but it never works!!! anyone! i dont know much but unix since i mostly work on NT here but i dont wanna disapoint my... (2 Replies)
Discussion started by: GermanJulian
2 Replies
10. Shell Programming and Scripting
hi,
i need help to write script in korn shell that will display info. on system paging, system process table.system file table inf.
thank you (1 Reply)
Discussion started by: neer45
1 Replies