Sponsored Content
Full Discussion: Problem with the script!!!
Top Forums Shell Programming and Scripting Problem with the script!!! Post 302870129 by alister on Friday 1st of November 2013 08:38:08 AM
Old 11-01-2013
Quote:
Originally Posted by Aditya_001
Nope the above command as well is not working Smilie
As far as feedback goes, that's as useless as it gets. Please, in the future, when members are trying to help you, the least you can do is provide specific details.

The cut command is a standard and widely available utility. I did not use any non-standard extensions. Given the sample input that you provided in post #3, it produces the desired output. So, exactly how does it fail to meet your requirements? Show us some data on which it fails. Show us the output it generates on your system (while you're at it, tell us which operating system and shell you're using). And show us the desired output for that data.



Quote:
Originally Posted by alister
If that doesn't apply, then you need to do a better job of specifying your data.
You have done a very poor job of specifying your data. It looks like it's pipe-delimited, but you want to remove a pipe. If it is pipe-delimited, that will alter the number of fields in each record. Do all records have the same number of fields? Is there some constant that can be used as a key? Your sample data and your textual description implies that the target to be replaced is preceded by a constant string ...
Quote:
Originally Posted by Aditya_001
In input file after the |HA4 9BZ| we have || and that needs to be replaced with | through out the file:
... but I suspect that may not be accurate.

Take a moment to put yourself in an ignorant mindset. We are not at all familiar with your data nor with what you are trying to accomplish. Whatever it is, it is likely not a difficult task and the only reason that this thread has gone on as long as it has is because you have not done a good job of helping us help you.

Regards,
Alister
This User Gave Thanks to alister For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Problem starting a script from a 'main'-script

Please Help! :o I have a main script (ksh) where another script is called (convert_picture). Normally this works ok, but since some changes has been made on the unix-server (I dont know what :( ) suddenly it doesnt work anymore: i get an error message: ksh: convert_picture not found. I am... (3 Replies)
Discussion started by: Rakker
3 Replies

2. Shell Programming and Scripting

Help. Script problem

hey guys. i have a bunch of programs in a script that needs to run as root and the rest as another user, we'll call him gabriel. now, in this script, i want to run the first few lines as root. now, how do i, after running as root, tell the script to run the remaining lines as the user gabriel?... (3 Replies)
Discussion started by: Terrible
3 Replies

3. Shell Programming and Scripting

ssh script problem problem

Hi Please help me with the following problem with my script. The following block of code is not repeating in the while loop and exiting after searching for first message. input_file ========== host001-01 host001-02 2008-07-23 13:02:04,651 ConnectionFactory - Setting session state... (2 Replies)
Discussion started by: pcjandyala
2 Replies

4. Shell Programming and Scripting

call shell script from perl cgi script problem

hi,, i have perl scipt with line : system('./try.sh $t $d $m'); in shell scipt try.sh i have the line: echo $1 its not printing value of $t that i hav passed..y is it so..i am running it from apache web server (2 Replies)
Discussion started by: raksha.s
2 Replies

5. UNIX for Dummies Questions & Answers

Problem with script

Hello All. I have a script that is suppossed to start up a daemon but when executed, simply hangs. Could you please take a look and let me know where the problem might be? TIA ################################################################### # # SCRIPT: dstart3000.sh # Bring up the Domain... (6 Replies)
Discussion started by: grin1dan
6 Replies

6. Shell Programming and Scripting

Problem with a script

Hi everyone, I got a problem with a script. What it's supposed to do is: to take as arguments a directory name <dir> and a dimension (in byte) <dim>; if <dir> exists, to write name and dimension of every regular file within it that sizes lesser than <dim> in regFileList. Nothing happens... (10 Replies)
Discussion started by: Luke Bonham
10 Replies

7. Shell Programming and Scripting

Problem running a program/script in the background from a script

Hi all, I have a script that calls another program/script, xxx, to run in the background. Supposedly this program at most should finish within five (5) minutes so after five (5) minutes, I run some other steps to run the script into completion. My problem is sometimes the program takes... (5 Replies)
Discussion started by: newbie_01
5 Replies

8. Shell Programming and Scripting

Problem while calling a script within a script

Hi , I have moduled my scripts in three scripts . From First script i am calling second and from second i am calling third for some check . Problem is with the third script call. ---In second script EXP ='test.\abc.\Server.*abc.xml.*' pid=$($HOME/bin/checkpid $EXP) --Third... (2 Replies)
Discussion started by: amrishn
2 Replies

9. Shell Programming and Scripting

Shell script newbie, what is problem with my script?

Hello, Ubuntu server 11.10 can anybody help what is problem with my shell script? #!/bin/bash #script to find out currently logged on user is root or not. if ] then echo "You are super" else echo "You are awesome!" fi When I run script, I get following output ./uid: line 3: I... (4 Replies)
Discussion started by: kaustubh
4 Replies

10. Shell Programming and Scripting

Problem in calling a script inside a script

Hi team, I have a script in different folder. Now i want to call that script and execute that script from that path alone. My code is #!/bin/bash wname=yahoo PATH='/opt/IBM' wac=`/usr/bin/ls $PATH | /usr/bin/grep "$wname"` STOP=`/usr/bin/find $PATH/$wac -type f -name "stop.sh"`... (8 Replies)
Discussion started by: natraj005
8 Replies
All times are GMT -4. The time now is 12:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy