Sponsored Content
Full Discussion: Junk Character in file
Top Forums Shell Programming and Scripting Junk Character in file Post 302179203 by nathgopi214 on Thursday 27th of March 2008 08:11:12 AM
Old 03-27-2008
Junk Character in file

Hi

set filename "./GopiRun.sh"

if [catch {set a [exec $filename ]} err] {
writeLog "error in exec "
writeLog $a
} else {
writeLog $a
}

The above code will execute a file GopiRun.sh,and will log the output of the exec to a file.
The problem is the file has lot of junk character in it,how to avoid it.
The file

^[[34mFly me to the moon...^[[0m
^[[0mLOG PATH:^[[0m ^[[0m/net/rita/disk1/disk3/ADVA/sw/nesw-F7/users/gopik/swbes/dev_tools/Test_F7/Twisted/internal_trace/^[[0m
^[[0m^[[1;34m Log log_name_2008_03_27_10.51.43__7851 is written in /net/rita/disk1/disk3/ADVA/sw/nesw-F7/users/gopik/log/ ^[[0m
^[[0mLOG PATH:^[[0m ^[[0m/net/rita/disk1/disk3/ADVA/sw/nesw-F7/users/gopik/swbes/dev_tools/Test_F7/Twisted/internal_trace/^[[0m
^[[0m^[[31mSSH Shell Connection Made^[[0m
^[[0msend: 'ps aux | grep tcli'^[[0m
^[[0mStarting tcli^[[0m
^[[0msend: 'tcli &'^[[0m
^[[0mLOG PATH:^[[0m ^[[0m/net/rita/disk1/disk3/ADVA/sw/nesw-F7/users/gopik/swbes/dev_tools/Test_F7/Twisted/internal_trace/^[[0m
^[[0m^[[31mTCLI Connection Made^[[0m
^[[0mSetting the Default client^[[0m
^[[0mClient is created^[[0m
^[[0mForce Destroy ^[[0m
^[[0mFORCEDESTROY:MOD-1-1;^[[0m
^[[0m COMPLD
RC_NOERROR
^[[0m
^[[0mGET::MOD-1-1:ADMIN;^[[0m
^[[0m COMPLD
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Get rid of junk character in a file

I have a file with one of the following lines, when opened with vi 33560010686GPT£120600GBPGBP10082007DS In the above line, I want to get rid of the junk character before the £ (pound sysmbol). When I tried copying £ from windows and copy in unix vi, it prints as £ and I tried pattern replace... (2 Replies)
Discussion started by: nskworld
2 Replies

2. UNIX for Dummies Questions & Answers

How to remove junk (^Ò) character while FTPing

Hi All, I have been trying to FTP some data files from Windows directory to a UNIX server. The txt file in the windows contails the following data: "111~XYZ~1~Contact person’s phone number~COMMENTS~~~~" but the same line is appearing as "111~XYZ~1~Contact person^Òs phone number~COMMENTS~~~~"... (8 Replies)
Discussion started by: vkumbhakarna
8 Replies

3. Shell Programming and Scripting

Remove all JUNK character from file.

Hi Team, I have a file having size greater than 1 GB. What i want to do is to check if it contains any JUNK character (ie any special charater thats not on the key board stroke). This file has 532 column & seperated with ^~^. I have found some solution from the file, but it is for a... (4 Replies)
Discussion started by: Amit.Sagpariya
4 Replies

4. Shell Programming and Scripting

Junk Character appended at the end of a line

Hi All I have a rather unusual problem, which i have not faced till now. I have a script which exports some paths to a text file. The script runs fine but when i check the output file i can see some junk characters ^M appended at end of lines and random places. I am not able to figure... (4 Replies)
Discussion started by: raghu_shekar
4 Replies

5. UNIX for Dummies Questions & Answers

how to grep junk characters in a file

hi guys, I am generating a file from datastage (an etl tool). Now the file is having some junk characters like ( Á,L´±,ñ and so on).. I want to use the grep function to figure out all the junk characters and their location. Can somebody help me out in finding it out.. if possible i... (1 Reply)
Discussion started by: mac4rfree
1 Replies

6. Shell Programming and Scripting

Check Junk character in sql file

Hello, I have two .sql files which I transferred from Windows to Unix (Linux Enterprise Linux Server release 5.3).I want to ensure that these two files have no junk characters in them.How do I do it in the simplest possible way? Many thanks DJ (1 Reply)
Discussion started by: Digjoy83
1 Replies

7. Shell Programming and Scripting

removing of junk character

Dear ALL, How to remove junk charecter ^M from unix file i am using sun solaris unix. I already tried few commands :%s/^M//g :%s/r//g but it didnt helped me. Any help appriciated. Thanks Ripudaman Please view this code tag video for how to use code tags when posting code... (5 Replies)
Discussion started by: ripudaman.singh
5 Replies

8. Shell Programming and Scripting

How to see junk character in file in.?

Hi I want to know how to see junk character in a file. i am not able to see junk character using vi or cat command. below is the junk char . which i see in host file 10.178.14.67▒▒▒ ac01sp02-vip actually it should be like this 10.178.14.67 ac01sp02-vip i am using secure CRT... (11 Replies)
Discussion started by: scriptor
11 Replies

9. Shell Programming and Scripting

Junk character appearing after downloading the file from windows server

Hello, Im downloading the file from windows server through FTP, the downloaded file is containing some junk character at very start of the file as below and causing my whole script is to fail, how to download without junk or how to remove these before processing it? ▒▒"nmdbfnmdsfsdf" ... (19 Replies)
Discussion started by: Riverstone
19 Replies

10. Emergency UNIX and Linux Support

Help in viewing the junk character

Hello All, I have issues in unix file when I loaded that to database and do select * from table where description like '%'+char(13)+'%' on it I am able to get records. I tried to view the file in unix it is all having blank character which I think is all non ascii which I am not able view.... (11 Replies)
Discussion started by: arunkumar_mca
11 Replies
raidctl(1M)						  System Administration Commands					       raidctl(1M)

NAME
raidctl - RAID hardware utility SYNOPSIS
raidctl -c disk1 disk2 raidctl -d disk1 raidctl [-f] -F filename controller... raidctl -l [controller...] DESCRIPTION
The raidctl utility creates, deletes, or displays RAID volumes of the LSI1030 HW Raid controllers that include RAID support. The utility also updates firmware/fcode/BIOS for both RAID and non-RAID controllers. The raidctl utility requires privileges that are controlled by the underlying file-system permissions. Only privileged users can manipulate the RAID system configuration. If a non-privileged user attempts to create or delete a RAID volume, the command fails with EPERM. Without options, raidctl displays the current RAID configuration on all exisiting controllers. OPTIONS
The following options are supported: -c disk1 disk2 (for on board) Create a mirror using disk1 and disk2. Replace the contents of disk2 with the contents of disk1. Specify disk1 and disk2 in canonical form, for example, c0t0d0. When you create a a RAID volume, the RAID volume assumes the identity of the first target in the disk pair (disk1). The second target (disk2) disappears from the system. Therefore, the RAID volume appears as one disk. To have a successful RAID creation, there must not already be a RAID configuration present on the specified controller. Additionally, the secondary disk must not be mounted, as it has all its data erased and replaced with the primary disk's data. -d disk1 (for on board) Delete the RAID volume specified as disk1. Specify disk1 in canonical form, for example, c0t0d0. -f (for HBA) Force an update. Do not prompt. -F filename controller (for HBA) Update the firmware running on the specified controller (controller). -l [controller ...] (for on board) List the system's RAID configuration. If controller is specified, list RAID configurations for controller. Output from the -l lists the following information: RAID Volume Displays logical RAID volume name. RAID Status Displays RAID status as either RESYNCING (disks are syncing), DEGRADED RAID is operating with reduced functionality), OK (operating optimally), or FAILED (non-functional). RAID Disk Displays RAID disk name. Disk Status Displays disk status as either OK or FAILED. EXAMPLES
Example 1: Creating the RAID Configuration The following command creates the RAID configuration: # raidctl -c c0t0d0 c0t1d0 RAID Volume 'c0t0d0' created Example 2: Displaying the RAID Configuration The following command displays the RAID configuration: # raidctl RAID RAID RAID Disk Volume Status Disk Status ---------------------------------------- c0t0d0 RESYNCING c0t0d0 OK c0t1d0 OK Example 3: Deleting the RAID Configuration The following command deletes the RAID configuration: # raidctl -d c0t0d0 RAID Volume 'c0t0d0' deleted Example 4: Updating Flash Images on the Controller The following command updates flash images on the controller: # raidctl -F lsi1030.fw 0 Update flash image on controller 0? (y/N): y Flash updated successfully EXIT STATUS
The following exit values are returned: 0 Successful completion. 1 Invalid command line input. 2 Request operation failed. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5) System Administration Guide: Basic Administration SunOS 5.10 17 Aug 2004 raidctl(1M)
All times are GMT -4. The time now is 10:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy