1,891 Topics

Member Avatar for
Member Avatar for faizalms

Guys, I'm quite new with awk and wanna do something like this: let say i have a file with this content : aaaa,bbbb,cccc,dddd and i wanna do an insert of " " only on the third column. and the output to be like this : aaaa,bbbb,"cccc",dddd fyi, the file contains …

Member Avatar for faizalms
0
124
Member Avatar for vrgurav

Hi all, can any one help me to solve the below query #!/bin/ksh #create or replace procedure a1 (a in number, b out varchar2) #is #begin --for testing purpose # b :='OKAY'; #end; $ORACLE_HOME/bin/sqlplus -s $userid << EOF set timing on set arraysize 5000 set serveroutput on size 1000000 exec …

0
97
Member Avatar for kalaivani.mani

hai, Print all the lines from the /etc/group file that don't contain the string "daemon".

Member Avatar for Infarction
0
73
Member Avatar for dyoung02

Hi All, I am trying to use awk to strip out the java version after I run the java -version command. Unfortunately nothing I try works. Here is the command I am running along with the output: # /h/jre/bin/java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build …

Member Avatar for dyoung02
0
129
Member Avatar for ezb

I'm new to bash, only been doing it a day or so, but having some trouble with one thing. I am trying to create a script that checks for updates, places them into a file, slightly formats them, then emails them. It's the latter I'm having trouble with, I have …

Member Avatar for ezb
0
99
Member Avatar for nathanpacker

I originally posted this in the wrong forum, so I hope I don't get ripped apart for a double post. As part of my new job, I'm learning a little shell scripting, working on an HP-UX system. I'm trying to automate a user account creation process, and I need to …

Member Avatar for nathanpacker
0
125
Member Avatar for Vikas Katara

I am making a script in Which FTP has to run automatically rather than providing user and password manualy...i just want to know the status that the file i am sending after FTP starts is reached successfully of not to destination by making a logfile ...which shows it is successful …

Member Avatar for masijade
0
100
Member Avatar for GOGO@FreeBSD

i have whrite this to learn a bit shell scripting, but now theres a mistake in it and i cant figure it out... (sry my english is very bad xD) here is my script: #!/bin/sh echo "This Programm will help u create, delete and coppy Directories and Files." echo "What …

Member Avatar for ravinpals
0
91
Member Avatar for vrgurav

Hi , when i specify export ORACLE_HOME=/orahome/app/oracle/product/10g export PATH=$ORACLE_HOME/bin bk=`hostname` echo $bk it gives error hostname not found if I comment both export line it works fine Can anyone tell me why is it so ?????? Thanks Vrgurav

Member Avatar for masijade
0
90
Member Avatar for flextronics

Hi All, I am new to scripting. I need your help to removing spaces from a string and assign them to different variables. Iwant to call script with one command line argument which is file name which containes different attributes their type and different values eg fdxE1ConfigAdminStatus int 1 2 …

Member Avatar for anil.sivapuram
0
152
Member Avatar for xkmail

I have a small server and want to ban ip address I get alot of spam from. I use fedora 4 with iptables, spamassassin, clamav, and psotfix. I get the line in /var/log/maillog that says: Jul 14 20:52:33 xkmail amavis[15966]: (15966-06) Blocked SPAM, LOCAL [127.0.0.1] [216.22.18.252] <ret@threecurtain.com> -> <miranda@xkmail.hopto.org>, Message-ID: …

0
52
Member Avatar for srinivasocp

Hi All, The following script checks whether the filename is correct then the script proceeds to check whether you have read,write and execute permisiions to the file and displays an approriate message. [CODE]#ss23 #usage ss23 echo "enter any filename \c" read fname if[!-z "$fname"] then if [-r $fname -a -w …

Member Avatar for radoulov
0
113
Member Avatar for abc12345

I have written a shell script for transfering files from ftp1 to ftp2. In ftp1 there can be any number of directories,For eg under sourdedir (mentioned below)there can be any number of directories eg /opt/lampp/htdocs/scrap/test1/ under test1 1.7505-----1.zip 2.2505------2.zip In each of the subdirectories there wilI have written a shell …

Member Avatar for peter_budo
0
151
Member Avatar for vrgurav

How to use mail in mks ? it gives not an internal or external command. can any one solve this problem Thanks Vishal

0
100
Member Avatar for samirs79

I have comma seperated values in a flat file, example below: [B]RStndrd,Mer,1902 PAR GRN,ParentGroup,[/B] I am interested in getting the third parameter from above, ([B]1902 PAR GRN[/B]) in a variable called MyID...i am using the command below to get the third variable [B]MyID=`echo $line|cut -f3 -d ","`[/B] but using the …

Member Avatar for pheeror
0
70
Member Avatar for dude67

Hello all, new to this site and to scripting. I am trying to search for the line with "CALIBRATE" in a file, and remove the leading # from the line with the following lines: cat $F1 | sed -e '/CALIBRATE/s/^#//' > $F1 cat $F2 | sed -e '/CALIBRATE/s/^#//' > $F2 …

Member Avatar for pheeror
0
705
Member Avatar for sgentry6

This is probably just due to my quotes, but I'm trying to get the following script up and running: This is my command line: find ./ -type f | xargs grep "#include <some.h>" | awk -F: '{print $1}' | xargs grep "#include <another.h>" I'm trying to find a nested header …

Member Avatar for Infarction
0
142
Member Avatar for jethfo

Calling All Shell Scripters, I am a web developer needing assistance from someone with shell scripting expertise. Does anyone have a unix shell script that can look into a directory and identify any "*.zip" files and ftp them to a remote server? Upon successful completion of the FTP transfer I …

Member Avatar for tabish.asm
0
124
Member Avatar for samirs79

Hello everyone! Below is a sample flat file (sampleflatfile.dat) i have on UNIX: [COLOR=#000000]AMPS,2324,Subscriber,Unknown,SingleDay,20070413,20070413,[/COLOR] [COLOR=#000000][/COLOR] [COLOR=#000000]ALPEnt,4516,AllMember,Unknown,DateRange,20070411,20070419,[/COLOR] [COLOR=#000000][/COLOR] [COLOR=#000000]AGLT,2156,Summary,Unknown,[/COLOR] [COLOR=#000000][/COLOR] [COLOR=#000000]DUPP,2536,Yes,Unknown,[/COLOR] each line above represents a report to be generated...therefore, the content of the sample flat file above means we need 4 reports (because there are 4 line)... the file above …

Member Avatar for vishu.awate
0
120
Member Avatar for jethfo

I need a robust shell script fast and don't have time to learn how script it myself from scratch. Summary: An existing PHP Application allows consumers to place an order for a product and upload files necessary to build that product. These files are stored in folders on the webserver …

Member Avatar for AHbrendan
0
114
Member Avatar for rockysfr

Hi all, Am having some weird problems with the Korn Shell that has left me puzzled for days... Consider having a line which resembles this in your script file: ssh username@host "command" ie. ssh rockysfr@localhost "ksh" This should put you in the ksh environment. Now, the strange thing is that …

Member Avatar for vishu.awate
0
74
Member Avatar for sandy_b76

Hi All Gurus, I am new to scripting.. and want to know what is the meaning of each non zero exit codes from 1-255. Please help. Thanks in advance Sandy_b76

Member Avatar for sandy_b76
0
167
Member Avatar for rusman

How can i get awk to separate the output with dashes? A simple awk '{print $1-$2-$3}' does not work.

Member Avatar for rusman
0
105
Member Avatar for jeromefong

I'm writing a Bash script to read from an input file and write my changes out to an output file. I'm using read and for some reason, it is stripping the leading spaces off of each line. I didn't see any flags in read to turn the stripping off. I'm …

Member Avatar for radoulov
0
156
Member Avatar for Toktam
Member Avatar for vrgurav
0
255
Member Avatar for Toktam

[B]Hi everyone, Is there any option for rm to remove a directory with no prompts?Actually I know about rm -r but by this option I have to answer lots of questions... Cheers, [/B]

Member Avatar for vrgurav
0
134
Member Avatar for TheDonDon

I'm completely new to this and have fallen at the first hurdle.:( I'm only playing so its not urgent. Here is my little bit of code: #!/bin/ksh print Content-type: text/html print print '<pre style=font-family:Fixedsys>' [B][COLOR="Red"]gtacl -c 'files $usvol1.ssdxl' [/COLOR][/B]|{ while read line ;do print "${line%%=*}" done } print '</pre>' Don't …

Member Avatar for TheDonDon
0
175
Member Avatar for 6figganigga

Hello, I'm fairly new to Linux and have managed to make this script below work. Basically it gets my current external ip and emails it to me. It works great as a cron job daily but I was wondering if some of you guru's may be able to augment this …

Member Avatar for 6figganigga
0
86
Member Avatar for le0pard13

Situation: I have a working shell script on our file server (OSXS Tiger) to connect to a workstation, which is using a portable home directory (phd), and rsync a user's MirrorAgent.log. I'm not that strong of a scripter, but I would like to add other workstations to this script as …

Member Avatar for le0pard13
0
149
Member Avatar for punnoose0607

Hi, I'm trying to shell script crontab commands, so that users can execute those by keeping the script inside the sudo menu. Users need to do this since they have only sudo access. Our server env is set in such a way that only root users can run crontab utilities. …

Member Avatar for thekashyap
0
84

The End.