10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I am having hard time getting this right and need some help. I Have 3 files, and everyone contains the following:-
File1
Today, we have Name(Jack) Age(19) Class (A2)
Today, we have Name(Kim) Class (G9)
File2
Today, we have Name(Lee) Age(19) Class (A2)
Today, we have... (8 Replies)
Discussion started by: samsan
8 Replies
2. Shell Programming and Scripting
Hi all. i need a small help.
i have written an exit code, which will check whether mo.sh is successful or not. if the status is >0 it will exit the shell.
1>Do you guys think it is a correct way to write?
2>what if i change the double bracket to single. how will it change the o/p.
... (1 Reply)
Discussion started by: sub
1 Replies
3. Shell Programming and Scripting
Hi All,
I have a text file which looks like this:
computer programming
systems engineering
I want to get rid of these square brackets and also the text that is inside these brackets. So that my final text file looks like this:
computer programming
systems engineering
I am using... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies
4. Shell Programming and Scripting
Hello,
I am trying to write a script using ksh. And I want to get the value within the first brackets of a string. For example:
14/04/11 11:35: 00 This is (nn) from the earth.
Then i hope to get nn in this case.
Can any one advise me how to implement it?
Thank you very much!
nn (2 Replies)
Discussion started by: n_n
2 Replies
5. Shell Programming and Scripting
Hi
I am having hard time getting this right and need some help. I Have several log files, and everyone contains the following 3 lines at the end:
4 ETW000 Disconnected from database.
4 ETW000 End of Transport (0000).
4 ETW000 date&time: 13.01.2011 - 08:03:28
I need to capture the value... (7 Replies)
Discussion started by: nimo
7 Replies
6. Shell Programming and Scripting
Hi,
I just came across an interesting shell script syntax like the one below:
] && (trap 'rm -rf ${WORK_DIR}/*.$$; echo "\n\nInterrupted !!\n\n"; exit 4' 1 2 3 15)
Can someone please explain the code snippet above?
The trap command bit is fine but ] && is the hazy part.
Generally we use an... (2 Replies)
Discussion started by: King Nothing
2 Replies
7. Shell Programming and Scripting
Hi,
I have a query term like this:
$query="apple NOT banana AND fruits";
$query="a1 NOT prim1 AND a2 NOT a3 OR a5";
I want to apply brackets to the NOT terms and the output should be like this:
$query="apple NOT (banana) AND fruits";
$query="a1 NOT (prim1) AND a2 NOT (a3) OR a5";... (2 Replies)
Discussion started by: vanitham
2 Replies
8. Shell Programming and Scripting
hi all,
i want to delete brackets in all the file and to keep the string or data between them ( example Q --> Qxxx) with sed command..
thanks (4 Replies)
Discussion started by: kamel.seg
4 Replies
9. Shell Programming and Scripting
:D i am pretty much new to scripting and don't want to pick up bad habits so I am trying to get myself to use brackets in my scripts since I plan on using them alot.. !
in this example of a script I wrote I can not figure out where the brackets go can anyone give me some insight into the use of... (3 Replies)
Discussion started by: moxxx68
3 Replies
10. UNIX for Dummies Questions & Answers
I would like to substitute a phrase which contains square brackets.
change TO
how?
Thanks (2 Replies)
Discussion started by: gilead29
2 Replies