Showcase your knowledge about Apple's newest OS. Write a how-to or share a tip or trick about Snow Leopard and earn unlimited points!

 

Having problems asking a question? Have a general question about Experts Exchange? Let us know!

 
Top ksh Solutions: 1 - 25 of 42
 
Can you please provide me with a shell script that does the following task? In a given file path location there may be one or more text files with different file names but with the same co...
I want to make sure the string does not start with a '#' sign. How do I do it in ksh script
if [condition] ; then     statements; fi; i am getting error " unexpected fi"
I need a script to place a time-stamp in the middle of a file name but also is there a way to get the extension without hard coding it in the scripts?  For instance some files maybe a .CSV ext...
We have a four node cluster for our oracle database setup. The nodes are clustered using Veritas Clustering Software( VCS). Two nodes are on site 1 called production site and the other two nod...
I need to examine a string reading from a file, i can come in different favor //12/path1/path2/filename filename /path1/path2/filename What I need to do is to make all readin string lke /p...
Unix version is: SunOS 5.10 Generic_141414-02 sun4v sparc SUNW,T5240 I am encountering the following error:   'ksh: /usr/bin/find: arg list too long' The directory that I am trying to...
HI,    I wanted to get a sub string i.e; timestamp 03-AUG-2009 from the string    ABCD_20091003162912_6481_ACSD_RST_XYXW_03-AUG-2009_TXT_001_ZIP.dat.gz I have tried the below command b...
Hey guys, In .ksh I need s cript to place a time-stamp in the middle of a file name.  see example below. ZO_FIG_DLY_FILENAME.CSV à ZO_FIG_DLY_FILENAME_200909081003.CSV Any ideas will ...
Hello folks, It would be great if some one can help me on ksh script I have pasted below 1) ksh script 2) sample input file 3) current output what I am getting 4) and expected desired ou...
Hello Folks,  Need a urgent help.  I need a script in awk or sed to read a input file and to print  a desired output on screen ----------------------------------------------------------...
I have a data file I can 'cat' and pipe into my script to process the data in the data file. But I wonder if I can redirect stdin to the data file. e.g cat datafile | myscript what I am h...
I am trying to write a scrip to put token from each line and put int a aray. Later I can then loop through the array from a for loop to process the token e.g my data file has following lines...
I am trying to truncate some output using KSH and am failing miserably... I have an input line that looks like this fc-ms01-scdb-ms01-store-partition-idx99 I need to assign the first wor...
I like to change the first letter of the word to uppercase
I have a script let say subsript.sh that take an arguement, I like to call it form mainscript.sh by passing subscript.sh and subscript argument as arguement to main script. Does anyone have a...
I have a file of data 111 abc hello 222 ccc  welcome I would like to read the file is ksh script by doing the following cat datafile > sh mysript.sh How do I do it? Can someone give me ...
I like to check if a substring is in the string, if it is, I would like to print a message. Has anyone have a sample like this.
I like to write a script to determine if the file is executable script.  How would I do this if given a file name
Consider the following commands used to duplicate all stdout and stderr from the ls command to a log file. ls myfile 2>&1 | tee file.log echo $? All output from the ls command needs to ...
For example, I have a variable X which value is a command , example X = "ps -ef | grep sendmail | grep root | wc -l" how can I run that command in my ksh script? please help. Thanks
I have all these wallpapers in a folder. I need a unix script to change the desktop background every day. Please suggest.
hi,            How to grep for control M characters in a file. I have tried the following command but it didnt work. Ex: grep "^M" file.txt Any help please.... Thanks.
I just not sure if it can redirect stderr to a file and at the same time to show it on the screen How would I  pipe it to the file?  
Hello Gurus, We would like to send an attachement through mail by using UNIX scripts. Please give us some solutions. Appriciate your earlier response. Regards. Hari