10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
when I execute the unix commands its works normally in the 1st part.
When I the tried the same in shell scripting the directory is not displayed in 2nd part example. please let me know what needs to be done.
Unix :
client=~zsvdbs
echo $client
/shome/zsvhome/zsvdbs
Using... (3 Replies)
Discussion started by: keerthi2016
3 Replies
2. Shell Programming and Scripting
Hello,
I have one script which looks as given below ,
. ${0%/*}/init && init_job || exit 1
what I understood is ,
1. above syntax has three commands, two on left of || and one on right of ||.
2. ${0%/*} would generate some path.
Question.
A. What is the meaning of ${0%/*} ,... (2 Replies)
Discussion started by: ParthThakkar
2 Replies
3. Programming
Hi,
Could someone help me how to replace last character string.
For example
$>export T1=abcde
$>export T2=xyz
my question is how to get result abcdxyz?
Many Thanks (2 Replies)
Discussion started by: nicklau81
2 Replies
4. UNIX for Dummies Questions & Answers
hi,
I want to search all files in the current working direcotry and to print in comma (,) seperated output. But I have two patterns to search for.
Files will be in ABC20100508.DAT format.
Search should happen on the format (ABC????????.DAT) along with date(20100508).
I can do a
ls... (2 Replies)
Discussion started by: anandapani
2 Replies
5. Shell Programming and Scripting
I'm processing ( trying to anyway ) a file of pipe delimited database output.
Sample record:
365026 | ocn424525329 | With his lightening-quick hands and feet
The second field in the above data is "ocn424525329". It should be
"424525329" with no trailing or leading spaces. This may be better... (2 Replies)
Discussion started by: Bubnoff
2 Replies
6. Shell Programming and Scripting
Dear all,
How can we know in a KornShell script reading a value from the standard input, that the entered value is the newline character? because as far as I know we cannot use \n for pattern matching. For example:
#!/bin/ksh
print -n "enter your value: "
read VALUE
if ]
then
... (2 Replies)
Discussion started by: dariyoosh
2 Replies
7. Programming
Assume client send the message " Hello ", i get output such as
Sent mesg: hello
Bytes Sent to Client: 6
bytes_received = recv(clientSockD, data, MAX_DATA, 0);
if(bytes_received)
{
send(clientSockD, data, bytes_received, 0);
data = '\0';... (2 Replies)
Discussion started by: f.ben.isaac
2 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I am writing a BASH script. In a directory I have a bunch of files of various filename structures. How do I list all the filenames that begin with either a capital or lowercase A or T. Is there one command that could replace the following 4:
ls A*
ls a*
ls T*
ls t*
Thanks.
Mike (3 Replies)
Discussion started by: msb65
3 Replies
9. Shell Programming and Scripting
Could someone tell me the single character wildcard for SED?
I have the file below:
$ more input2
AAA /A/B/C BBB /D/E/F
CCC /G/H/I DDD
I want to remove all strings which contain forward slashs "/" to get the below:
AAA BBB
CCC
I tried to do it in SED by the command below but I... (8 Replies)
Discussion started by: stevefox
8 Replies
10. UNIX for Dummies Questions & Answers
I'm trying to figure out how to build a small shell script that will find old .shtml files in every /tgp/ directory on the server and delete them if they are older than 10 days...
The structure of the paths are like this:
/home/domains/www.domain2.com/tgp/
/home/domains/www.domain3.com/tgp/... (1 Reply)
Discussion started by: Neko
1 Replies