Script required (Example of a Bad Forum Subject)


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Script required (Example of a Bad Forum Subject)
# 8  
Old 02-05-2010
Hi.

Your data still doesn't seem right, but..

Code:
awk -F+ -vOFS=+ '{if( /^"/ ) $5=$6="\"XXX\""; else $4=$5="\"XXX\""}1' file

1232+"32"+"932"+"XXX"+"XXX"+"23"+
1234+"32"+"933"+"XXX"+"XXX"+"24"+
1233+"32"++"XXX"+"XXX"+"24"+
"LP232"+"40"+"932"+"436U"+"XXX"+"XXX"+"23"
"LP1234"+"44"+"933"+"82JK"+"XXX"+"XXX"+"24"
"LP23"++"920"++"XXX"+"XXX"+"23"

# 9  
Old 02-05-2010
The title of this thread "Script required" ....

... is a perfect example of how not to post in these forums.

First of all, the subject violates the rule of being descriptive with a subject / title.

Second, it is very impolite to post to a forum seemingly demanding others write a script for you ... 'Script required'.....

Do not post inconsiderately like this here.

Thank you.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bad status in UNIX Script

Hello, sorry for my questions about that below script but i have an error that i don't understand. It seems that my find command is not working fine but for me the command is ok Thanks for your help ===================================== /usr/IBM/HTTPServer/apache_cache... (4 Replies)
Discussion started by: steiner
4 Replies

2. Shell Programming and Scripting

Bad substitution error in shell script

I have script data.sh which has following error. Script Name : data.sh #!/bin/sh infile=$1 len=${#infile} echo $len texfile=${infile:0:$len-4} echo $texfile run command ./data.sh acb.xml I get following error message: (5 Replies)
Discussion started by: man4ish
5 Replies

3. Shell Programming and Scripting

Why I get bad bad substitution when using eval?

Why I get bad replace when using eval? $ map0=( "0" "0000" "0") $ i=0 $ eval echo \${map$i} 0000 $ a=`eval echo \${map$i}` !!!error happens!!! bash: ${map$i}: bad substitution How to resolve it ? Thanks! (5 Replies)
Discussion started by: 915086731
5 Replies

4. Solaris

"Solaris" - A very good example of a very bad subject title

Any body known this command uadmin 2 (2 Replies)
Discussion started by: Rajesh_Apple
2 Replies

5. Linux

This forum's font looks bad on my new installation

Some forums, including this one, look bad in FireFox on my new installation of Arch. Or more specifically, the main font looks bad. I had the exact same problem on Fedora a few years ago when I did a new installation. I thought I rememberered that the solution there was to install some Lucida... (0 Replies)
Discussion started by: KenJackson
0 Replies

6. Shell Programming and Scripting

bad interpreter when running script

Hi All, I'm not confortable in writing script, can someone can help me, when I run that script below i found this error code : -bash: ./script.sh: /bin/sh.: bad interpreter: Here is the script for i in * x=${i##*.} z=$(perl -e 'print time;') t=$(echo $z-$x|bc)... (12 Replies)
Discussion started by: bzb23
12 Replies

7. Shell Programming and Scripting

Behavior of Bad Script in Cron Job

Hi A Ksh script is deployed in a server and executed through cronjob. If one of the line in the middle of the script fails . Are the remaining lines executed ? (3 Replies)
Discussion started by: Sivaswami
3 Replies

8. Shell Programming and Scripting

Script to search a bad record in a file then put the record in the bad file

I need to write a script that can find a bad record (for example: there is date field colom but value provided in the file for this field is N/A) then script shoud searches this pattern and then insert the whole record into the bad file. Example: File1 Name designation dateOfJoining... (2 Replies)
Discussion started by: shilendrajadon
2 Replies

9. UNIX for Advanced & Expert Users

Script to search a bad record in a file then put the record in the bad file

I need to write a script that can find a bad record (for example: there is date field colom but value provided in the file for this field is N/A) then script shoud searches this pattern and then insert the whole record into the bad file. Example: File1 Name designation dateOfJoining... (1 Reply)
Discussion started by: shilendrajadon
1 Replies
Login or Register to Ask a Question