10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I need to be able to say "My name is $USER' when I use echo it work, when I use printf it print more 'my last name@.........'. How can I get just the part before the @ sign. I have to use printf. using UNIX.
------ Post updated at 01:17 PM ------
I used the activation code but I still... (2 Replies)
Discussion started by: sheltie042
2 Replies
2. Shell Programming and Scripting
hi
i am trying to extract some specific data out of a text file using regular expressions with shell script
that is using a multiline grep .. and the tool i am using is pcregrep so that i can get compatibility with perl's regular expressions
for a sample data like this, i am trying to grab... (6 Replies)
Discussion started by: vemkiran
6 Replies
3. Shell Programming and Scripting
I need to automate something as part of post processing in a script . Each project is identified by a 3 letter string which is part of hostname and based on hostname I need to copy a particular file to that machine from my distribution .
here are hostnames
pprdifeap01.corp.host.net (where... (1 Reply)
Discussion started by: gubbu
1 Replies
4. Shell Programming and Scripting
FOLKS ,
i have a text file that is generated automatically of an another korn shell script, i want to bring in the fifth line of the text file in to my korn shell script and look for a particular word in the line . Can you all share some thoughts on this one.
thanks...
Venu (3 Replies)
Discussion started by: venu
3 Replies
5. Shell Programming and Scripting
I need to extract the following lines from this text and put it in different files.
From xxxx@gmail.com Thu Jun 10 21:15:46 2010
Return-Path: <xxxxx@gmail.com>
X-Original-To: xxx@localhost
Delivered-To:xxxx@localhost
Received: from ubuntu (localhost )
by ubuntu (Postfix) with ESMTP... (11 Replies)
Discussion started by: waxo
11 Replies
6. Shell Programming and Scripting
Shell Scripting Gurus,
I am having a hard time :confused: trying to figure out what I am doing wrong in my script. Below is the script snippet. It gives an error when it tries to execute the expression.
a=`expr substr $stringZ 5 10`
#!/bin/bash
echo "Hello"
stringZ="abcABC123ABCabc"... (3 Replies)
Discussion started by: yajaykumar
3 Replies
7. Shell Programming and Scripting
I'm writing a shell script in which I need to be able to pull a portion of the file name out. I'm testing with the following code:
x="O1164885.DAT"
y=`ls -ltr *${x}|awk '{print substr($0,3)}'`
echo ${x}|awk '{print substr($0,3)}'
echo "y="$y
I can echo it to the screen just fine but I... (3 Replies)
Discussion started by: ttunell
3 Replies
8. Shell Programming and Scripting
hi,
i am using the following script to get the last digit of YEAR
OY=`expr substr $YEAR 2 1`
it is showing syntax
Is this wrong or i need to change anything
I am running this in sun solaris unix (7 Replies)
Discussion started by: gjithin
7 Replies
9. Shell Programming and Scripting
Hi,
I am new stuff to learn substr() function through awk for writing the Korn shell script.
Is there a way to copy from XXXX1234.ABCDEF to XXX1234 file names without changing both data files?
I appreciate your time to response this email.
Thanks,
Steve (4 Replies)
Discussion started by: sbryant
4 Replies
10. Shell Programming and Scripting
Hi,
I'm a newbie to UNIX scripting and I'm having some trouble compiling my script. I'm using the Bourne Shell and cannot seem to use the substr function correctly. I'm trying to extract the last two digits of a year that's stored in a variable based off of a condition. I've searched the... (4 Replies)
Discussion started by: E2004
4 Replies