10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I have a below syntax its working fine...
var12=$(ps -ef | grep apache | awk '{print $2,$4}')
Im getting expected output as below:
printf "%b\n" "${VAR12}"
dell 123
dell 456
dell 457
Now I wrote a while loop.. the output of VAR12 should be passed as input parameters to while loop and results... (5 Replies)
Discussion started by: sam@sam
5 Replies
2. Shell Programming and Scripting
Hi ,
I have a set of files in a folder which i need to cut in to two parts....
Sample files
touch AE_JUNFOR_2014_MTD_2013-05-30-03-30-02.TXT
touch AE_JUNFOR_2014_YTD_2013-05-30-03-30-02.TXT
touch temp_AE_JUNFOR_2014_MTD_2013-05-30-03-30-02.TXT
touch... (4 Replies)
Discussion started by: chillblue
4 Replies
3. Shell Programming and Scripting
I was trying the below statement if
It is working fine if I run it in a test file.
but not working, when I am trying in my actual script.
Error:
: "${FXML_line:1129:1}": bad substitution
Thanks in advance :)
PS: Above if block I have a while loop which is reading a... (4 Replies)
Discussion started by: ezee
4 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
I have a string in the following format
"abcd | fghfh | qwer | ertete"
I need to cut the values in the following format
line1 = abcd | fghfh | qwer
line2 = ertete
Simply speaking a want to cut all the values before the last delimiter from the line and print it on one line and... (11 Replies)
Discussion started by: amit_kv1983
11 Replies
5. Shell Programming and Scripting
Hi all
I have a string variable ${WHERE_SQL1} where i want to cut the first value of a variable.
Eg ${WHERE_SQL1} = 'Where a.id =.................'
I the string to be 'a.id =.......'
Thanks in advance (2 Replies)
Discussion started by: theeights
2 Replies
6. Shell Programming and Scripting
I have a variable var which contains "ABCDEFDH"
Now I have to remove the first 4 characters that is "ABCD"
so my variable should contain only "DEFH"
plzz tell me how to do that .
i am using bash shell (1 Reply)
Discussion started by: cynosure2009
1 Replies
7. Shell Programming and Scripting
Hi,
I am using bash. My question concerns cutting out segments of a string. Given the following filename:
S2002254132542.L1A_MLAC.x.hdf
I have been able to successfully separate the string at the periods (.):
$ L1A_FILE=S2002254132542.L1A_MLAC.x.hdf
$ BASE=$(echo $L1A_FILE | awk -F.... (5 Replies)
Discussion started by: msb65
5 Replies
8. Shell Programming and Scripting
Hi
I'm trying to find a way to search a text file for a specific string.
I have a file which contains i.p. addresses and port numbers in the following format:
'ip="www.xxx.yyy.zzz"'
'port="xx""'
I want to print only the parts between the double quotes for use in seperate variables,... (4 Replies)
Discussion started by: melias
4 Replies
9. Shell Programming and Scripting
Hi,
I wanted to cut a specific portion from given string. How would I do that?
Example:
/u09/core/inbound/abc.txt is my string.
I want abc.txt in a variable.
Please help me.
Regards,
Dhaval (3 Replies)
Discussion started by: dhaval_khamar
3 Replies
10. Shell Programming and Scripting
I have a file name coming in as such
<string>_YYYYMMDD.DAT
The string could be anything. I want to cut out the date and put it in a variable. Can someone help me with this? (4 Replies)
Discussion started by: lesstjm
4 Replies