10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
What is an awk command to print only fields with a number in it??
Input file.......
S,S,S,S,S,S,S,S,S
001S,S,S,S,S,S,S,S,S
00219S,23S,24S,43S,47S,S,S,S,S
00319S,10S,23S,41S,43S,47S,S,S,S
00423S,41S,43S,46S,47S,S,S,S,S
00510S,23S,24S,43S,46S,S,S,S,S
00610S,23S,43S,46S,47S,S,S,S,S... (2 Replies)
Discussion started by: garethsays
2 Replies
2. Shell Programming and Scripting
Hi Forum.
I'm running the following awk command to extract the suffix value (pos 38) from the "AM00" record and append to the end of the "AM01" record.
awk 'substr($0,13,4)=="AM00" {SUFFIX = substr($0,38,2)} substr($0,13,4)=="AM01" {$0 = $0 SUFFIX} 1' before.txt > after.txt
Before.txt:... (2 Replies)
Discussion started by: pchang
2 Replies
3. Shell Programming and Scripting
Hi all,
I currently have the following problem:
In an awk script, I am calling a predifend function from the END{} and handing over a command string. This string arrives flawless and is executed like this:
function send_msg( cmd_str )
{
... (7 Replies)
Discussion started by: zaxxon
7 Replies
4. Shell Programming and Scripting
Hi,
need your help in below,I have 4 types of file need to be processed so that it will replace carriage return in Remarks column with <:::>
Remarks column position may varies in different types of file.
sample file:
col1|col2|col3|col4|col5|col6|col7|Remarks|col9|col10... (8 Replies)
Discussion started by: agathaeleanor
8 Replies
5. Shell Programming and Scripting
Gurus,
I have written a shell script to backup a database and applications. This is how the script works:
1. As applications user (say applmgr), the main backup script, say backup.sh, is kicked off.
2. backup.sh does ssh to oracle user and kicks off the database backup using nohup and... (1 Reply)
Discussion started by: sunpraveen
1 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I am trying to use this command to backup my remote server:
ssh ftp nice -19 bru -cXiAf mail-02:/dev/nst1 /etc
When I run I get:
connect to address 205.150.86.5 port 544: Connection refused
connect to address 205.150.86.5 port 544: Connection refused
trying normal rsh... (1 Reply)
Discussion started by: mojoman
1 Replies
7. Shell Programming and Scripting
How do I evaluate the result of a command assigned to a variable??
Example:
var1=`cmd`
rc=$?
rc will be the result of the assignment rather than cmd since it executes after. How do I evaluate the result of the command itself?
Cheers..:confused: (2 Replies)
Discussion started by: browndr
2 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
Can anyone please let me know the syntax / how to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 'system()' function and '${?}'.
I am in a process to send the mail automatically with an attachment to bulk users. I have used 'Mailx' and 'Unencode'... (0 Replies)
Discussion started by: manas6
0 Replies
9. Shell Programming and Scripting
How to find out whether the command I executed is successful or unsuccessful(at commandlinet)
Eg:
say i execute the following command at command line
rm *
How do i find out whether my previous command is a success or failure.
Thankyou.
Best Regards,
Ram. (1 Reply)
Discussion started by: ramky79
1 Replies
10. UNIX for Advanced & Expert Users
I have a script which loads data files into Oracle and then moves each file into a 'processed' directory when each file has finished loading.
Last night I found that the script was failing on the mv statement (with a return code 2) and the following message,
mv: cannot access... (1 Reply)
Discussion started by: handak9
1 Replies