Sponsored Content
Top Forums Shell Programming and Scripting Removing characters from a string Post 73707 by Ygor on Friday 3rd of June 2005 11:17:16 AM
Old 06-03-2005
NewVar=$(basename $FileName)
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Removing characters from end of $string

I am writing a script to search PCL output and append more PCL data to the end accordingly. I need to remove the last 88 bytes from the string. I have searched for a few hours now and am coming up with nothing. I can't use head or tail because the PCL output is all on one line. awk crashes on... (3 Replies)
Discussion started by: craig2k
3 Replies

2. Shell Programming and Scripting

Help with removing characters like ^M

I have few files in unix which are in dos format. While I am copying these files, ^M, ^@, etc characters are being generated. I tried dos2unix command in Linux and it doesn't work. I tried sed to remove these characters but they won't go. I came to about this 'tr' command and tried to use it... (16 Replies)
Discussion started by: chiru_h
16 Replies

3. HP-UX

Removing ^D and ^H characters

Hi, I have a very huge file and it contains some unprintable characters like ^H and ^D. If I try to remove using cat test1.ser| tr -d '\136 110'>newfile1 it is only removing ^and all spaces in the file. How can I remove these characters (^D ^H) and keep my spaces as it is? Thanks &... (1 Reply)
Discussion started by: arsheshadri
1 Replies

4. UNIX for Dummies Questions & Answers

removing characters

Hi all, Any help on how to do the following? :eek: I have an infile as follows: _thisishowyouwritehelloworld _thisisalsohowyouwritehelloworld2 I want to delete the characters from "_" to "how" and be left with: youwritehelloworld youwritehelloworld2 I am able to do delete from a... (2 Replies)
Discussion started by: dr_sabz
2 Replies

5. UNIX for Advanced & Expert Users

Removing ^M characters

hi I have a perl script conv.pl. when i execute this file and direct i to log file I see lots of ^M characters in the log file. There is no ^M in conv.pl file. Log file is generated only after conv.pl is executed. Please help as how to get rid of these. This conv.pl is going to get schduled... (0 Replies)
Discussion started by: infyanurag
0 Replies

6. UNIX for Dummies Questions & Answers

Removing ^M characters

hi I have a perl script conv.pl. when i execute this file and direct i to log file I see lots of ^M characters in the log file. There is no ^M in conv.pl file. Log file is generated only after conv.pl is executed. Please help as how to get rid of these. This conv.pl is going to get schduled... (5 Replies)
Discussion started by: infyanurag
5 Replies

7. Shell Programming and Scripting

Removing ^M characters from a file

Hi, I want to removing ^M characters from a file and combine the line with the next line. ex: issue i have: ABC^M^M DEF solution i need: ABCDEF I found that you by using the following command you can remove new line characters. tr -d '\r' < infile.csv > outfile.csv still... (10 Replies)
Discussion started by: mwrg
10 Replies

8. UNIX for Dummies Questions & Answers

Removing characters from end of string

Hello, I have records like below that I want to remove any five characters from the end of the string before the double quotes unless it is only an asterik. 3919,5020 ,04/17/2012,0000000000006601.43,,0000000000000000.00,, 132, 251219,"*" 1668,0125 ... (2 Replies)
Discussion started by: jyoung
2 Replies

9. Shell Programming and Scripting

Removing last and first characters in a file

bash-3.00$ cat temp.txt ./a/REA01/ces1/apps/ces_ces1_init3_aa.ear/ces.war/WEB-INF/classes/reds/common/environment.properties ./a/REA01/ces1/apps/ces_ces1_init3_aa.ear/commonproperties/hi/HostIntegration.properties... (9 Replies)
Discussion started by: bhas85
9 Replies

10. Shell Programming and Scripting

Outputting characters after a given string and reporting the characters in the row below --sed

I have this fastq file: @M04961:22:000000000-B5VGJ:1:1101:9280:7106 1:N:0:86 GGGGGGGGGGGGCATGAAAACATACAAACCGTCTTTCCAGAAATTGTTCCAAGTATCGGCAACAGCTTTATCAATACCATGAAAAATATCAACCACACCA +test-1 GGGGGGGGGGGGGGGGGCCGGGGGFF,EDFFGEDFG,@DGGCGGEGGG7DCGGGF68CGFFFGGGG@CGDGFFDFEFEFF:30CGAFFDFEFF8CAF;;8... (10 Replies)
Discussion started by: Xterra
10 Replies
Execute(4)						     Kernel Interfaces Manual							Execute(4)

NAME
Execute - Contains instructions for running commands that require the resources of a remote system SYNOPSIS
/usr/spool/uucp/SystemName/X.RemoteSystemNxxxx DESCRIPTION
The Execute (X.*) files contain instructions for running uucp commands that require the resources of a remote system. They are created by the uux command. The full pathname of a uux command execute file is a form of the following: /usr/spool/uucp/SystemName/X.RemoteSystem- Nxxxx where the SystemName directory is named for the local computer and the RemoteSystem directory is named for the remote system. The N char- acter represents the grade of the work, and the xxxx notation is the 4-digit hexadecimal transfer-sequence number; for example, X.zeusN2121. Note that the grade of the work specifies when the file is to be transmitted during a particular connection. The grade notation is a sin- gle number (0 to 9) or letter (A to Z, a to z). Lower sequence characters cause the file to be transmitted earlier in the connection than do higher sequence characters. The number 0 (zero) is the highest grade, signifying the earliest transmittal; z is the lowest grade, sig- nifying the latest transmittal. The default grade is N. Standard Entries in an Execute File An execute file consists of several lines, each with an identification character and one or more entries: Format and Description U UserName SystemName Specifies the login name of the user issuing the uux command and the name of the system from which the command was issued. N or Z Indicates the error status. The N character means that a failure message is not sent to the user issuing the uux command if the specified command does not exe- cute successfully on the remote system. The Z character means that a failure message is sent to the user issuing the uux command if the specified command does not execute successfully on the remote system. R UserName Specifies the login ID of the user requesting the remote command execution. F FileName Contains the names of the files required to execute the specified command on the remote system. The FileName parameter can be either the complete pathname of the file, including the unique transmission name assigned by the uucp program, or simply the trans- mission name without any path information. The Required File Line can contain zero or more filenames. The uuxqt daemon checks for the existence of all listed files before running the specified command. I FileName Specifies the standard input to be used. The standard input is either specified by a < (less than) symbol in the command string, or is inherited from the standard input of the uux command if that command was issued with the - (dash) flag. If standard input is specified, it also is listed in an F (Required File) line. If standard input is not specified, the uucp program uses the /dev/null device file. O FileName SystemName Specifies the names of the file and system that are to receive standard output from the execution of the command. Standard output is specified by a > (greater than) symbol within the command string. (The >> sequence is not valid in uux commands.) As was the case with standard input, if standard output is not specified, the uucp program uses the /dev/null device file. C CommandString This is the command string that the user requests to be run on the specified system. The uucp program checks the /usr/lib/uucp/Per- missions file on the designated computer to see whether the login ID can run the command on that system. All required files go to the execute file directory, usually /usr/spool/uucp/.Xqtdir. After execution, the standard output is sent to the requested location EXAMPLES
User fong on local system zeus enters the following command: uux - "diff /u/fong/out hera!/u/fong/out2 > ~uucp/DF" This invokes the uux command to run a diff command on the local system, comparing file /u/fong/out with file /u/fong/out2, which is stored on remote system hera. The output of the comparison is placed in the DF file in the public directory on the local system. This command produced the /usr/spool/uucp/hera/X.zeusN212F execute file, which contains the following information: U fong zeus # return status on failure Z # return address for status or input return R fong F /usr/spool/uucp/hera/D.herale954fd out2 O ~uucp/DF zeus C diff /u/fong/out out2 The user line identifies user fong on system zeus. The error status line indicates that fong will receive a failure status message if the diff command fails to execute. The requester is fong, and the file required to execute the command is the following data file: /usr/spool/uucp/hera/D.herale954fd out2 The output of the command is to be written to the public directory on system zeus with the filename DF. (Remember that ~uucp is the shorthand way of specifying the public directory.) The final line is the command string that user fong entered with the uux command. The following is another example of an execute file: U uucp hera # don't return status on failure N # return address for status or input return R uucp F D.hera5eb7f7b I D.hera5eb7f7b C rmail fong This indicates that user uucp on system hera is sending mail to user fong, who is also working on system hera. FILES
Describes access permissions for remote systems Describes accessible remote systems Contains uucp command, data, and execute files Contain instructions for transfers Contains lists of commands that remote systems are permitted to execute Contains files that have been trans- ferred RELATED INFORMATION
Daemons: uuxqt Commands: diff(1), uux(1) delim off Execute(4)
All times are GMT -4. The time now is 10:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy