10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I have variable named tablename. The value to tablename variable has leading and trailing white spaces. How to remove the leading and training white spaces and write the value of the tablename without space to a file using shell script. ( for e.g. tablename= yyy )
INPUT
... (10 Replies)
Discussion started by: pottic
10 Replies
2. Shell Programming and Scripting
Hi,
I am trying to remove leading and trailing spaces from a file using awk but somehow I have not been able to do it.
Here is the data that I want to trim.
07/12/2017 15:55:00 |entinfdev |AD ping Time ms | .474| 1.41| .581|green |flat... (9 Replies)
Discussion started by: svajhala
9 Replies
3. Shell Programming and Scripting
I'm a newbie to shell scripting.
Can anyone help with the below requirement ?
The leading and trailing date of a files to be removed.
2017-07-12_gmr_tag_log_20170711.csv
2017-07-12_gmr_call_log_20170711.csv
2017-07-12_gmr_outgoing_log_20170711.csv
I'm looking for output like... (7 Replies)
Discussion started by: shivamayam
7 Replies
4. Shell Programming and Scripting
Does anyone know of a way with C Shell that will work on both Linux and Sun to clear all leading and trailing blanks from a previously specified string? I am using the following code to replace blanks with underscores:
set Company = `echo $Company | sed 's/ /_/g
but I don't want any... (1 Reply)
Discussion started by: phudgens
1 Replies
5. Shell Programming and Scripting
Hi All,
I am having a file which contains negative numbers, wht i am doing is re-formattting the file(moving few columns and add few hard codings between), while reformatting i would want the negative numbers to have the sign as trailing rather than leading.
Existing
-2400.00
34
0.00... (11 Replies)
Discussion started by: selvankj
11 Replies
6. Shell Programming and Scripting
Hello People
How to check whether lines in a text file have trailing spaces or not and if a line have trailing spaces then how many trailing spaces line have?
Regards
ARvind kumar (5 Replies)
Discussion started by: arvindk.monu
5 Replies
7. Shell Programming and Scripting
Hi All,
I have a file with the following contents with multiple lines
172445957| 000005911|8| 400 Peninsula Ave.#1551 | And,K |935172445957|000005911
607573888 |000098536 | 2|Ane, B |J |Ane |1868 |19861206|20090106|20071001
I want to trim the "leading and trailing spaces only" from... (2 Replies)
Discussion started by: kumar04
2 Replies
8. Shell Programming and Scripting
Dear All,
can you please advice how do i remove trailing and leading spaces from a pipe-delimited file using "tr" command
the below cmd, i tried removed all spaces
tr -d ' '<s1.txt>s2.txt1
Many thx
Suresh (5 Replies)
Discussion started by: sureshg_sampat
5 Replies
9. UNIX for Dummies Questions & Answers
I am having xml document as below.
<transactionid>
00
</transactionid>
<tracknumber>
0
</tracknumber>
<key>
N/A
</key>
But the data contains leading and trailing spaces between the tags. Please let me know how can i remove these leading and trailing spaces between the tags.... (2 Replies)
Discussion started by: jhmr7
2 Replies
10. Shell Programming and Scripting
I am trying to strip all leading and trailing spaces of a shell variable using either awk or sed or any other utility, however unscuccessful and need your help.
echo $SH_VAR | command_line Syntax.
The SH_VAR contains embedded spaces which needs to be preserved. I need only for the leading and... (6 Replies)
Discussion started by: jerardfjay
6 Replies
dxdw(8) System Manager's Manual dxdw(8)
NAME
dxdw - Runs and repeats command line commands
SYNOPSIS
/usr/bin/X11/dxdw [-c initial_command]
OPTIONS
Specifies the command to run. The command string must be enclosed in double quotes if it contains any spaces or special characters inter-
preted by the shell.
Display Window accepts all of the standard X Toolkit command line options, which are documented in the OPTIONS section of the X(1X) refer-
ence page.
DESCRIPTION
The Display Window application, dxdw, can be used to run commands at specified time intervals.
You can use Display Window to: Run a command and display a transcript of the output Repeat a command at regular intervals Print the output
to the default printer Save the output to a file
You can use Display Window to run common commands without starting up a full xterm. The optional -c option specifies an initial command.
The Display Window application presents a transcript containing the current command, its output, and its command-line error messages. You
can change the command after the application starts. The transcript area is output-only, so you cannot use Display Window to run commands
that require user interaction on the command line.
The Display Window application can be invoked from the CDE Application Manager from the following categories:
Application Group: System_Admin
System Admin Subgroup: Daily Admin
When the Display Window main window invoked, the transcript is empty because there is no command running. Enter a command to run in the
Command input text field.
Because Display Window can be started with a default initial command, several launchpoints have been created in the Application Manager to
run specific command-line applications. These applications include I/O Statistics (iostat), Network Statistics (netstat), Virtual Memory
Statistics (vmstat), and Who? (who).
To start one of the preceding applications within Display Window from the CDE desktop: Click on the Application Manager icon on the CDE
front panel. Double click on the System_Admin application group icon. Double click on the Tools application group icon. Double click on
the icon for the command you want to run in the Display Window application.
The Display Window application invokes the command once. The output from the command is displayed in the transcript area.
You can also start Display Window from the command line. To start Display Window from the command line, enter the following:
/usr/bin/X11/dxdw [-c initial_command]
The -c option specifies the command string to run when Display Window is started. On the command line, the command string must be enclosed
in double quotes if it contains any spaces or special characters interpreted by the shell.
The command string can be any of the following: A single command A series of commands in a pipeline (|) A series of commands separated by
semicolons
After Display Window starts, a new command string can be entered in the Command input text field. In the graphical user interface, it is
not necessary to enclose the command string in double quotes.
To enter a new command string: Clear the Command input text field if a command is already present. Enter a new command string in the Com-
mand input text field. Press the Return key in the Command input text field to run the command.
EXAMPLES
The following example runs the iostat command one time in the Display Window application. You can use the Repeat Every dialog box to repeat
the command at regular intervals. dxdw -c iostat The following examples show how to use Display Window from the command line. dxdw -c df
dxdw -c "ps -aef" dxdw -c "ps -aef | grep dxdw" dxdw -c "mount; showmount" You can view the Display Window online help volume without run-
ning the application. To open the Display Window help volume from the command line, enter the following command: /usr/dt/bin/dthelpview -h
/usr/dt/appconfig/help/C/Dxdw.sdl
FILES
Contains the Display Window application executable Contains the Display Window help volume Contains the default values for the applica-
tion's X resources
SEE ALSO
Commands: iostat(1), netstat(1), vmstat(1), who(1), X(1X)
dxdw(8)