04-11-2013
thanks Yoda. your script worked very well.
thanks Again.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am sending the output of a file to .csv file.
The output should look like this:
Total Customers Processed:,8
Total Customers Skipped:,0
Total Customers Added:,8
Total Customers Changed:,0
Total Policies Deleted:,0
Total Policies Failed:,0
total:,8
Now i want this output in... (1 Reply)
Discussion started by: Prashant Jain
1 Replies
2. Shell Programming and Scripting
Hi,
I have two files , one file with data file with attributes that need to be sent to another file to generate a predefined format.
Example:
File.txt
AP|{SSHA}VEEg42CNCghUnGhCVg==
APVG3|{SSHA}XK|"password"
AP3|{SSHA}XK|"This is test"
....
etc
---------
test.sh has... (1 Reply)
Discussion started by: hudson03051nh
1 Replies
3. Shell Programming and Scripting
I am getting a no of fields from a SQL session (e.g. select a,b,c from table). How do I convert the output values into CSV format .
The output should be like this 'a','b','c', (4 Replies)
Discussion started by: mady135
4 Replies
4. Shell Programming and Scripting
Hi Friends,
I'm a great fan of this forum... it has helped me tone my skills in shell scripting. I have a challenge here, which I'm sure you guys would help me in achieving...
File A has a list of job ids and I need to compare this with the File B (*.log) and File C (extend *.log) and copy... (6 Replies)
Discussion started by: asnandhakumar
6 Replies
5. Shell Programming and Scripting
I'm just wondering is there any way to capture the output of a unix command in a csv format.
df -h gives the result of filesystem,free space,Used space, use %,mounted on.
Is there a way to capture the command output and format it as comma sparated or fixed length file. (3 Replies)
Discussion started by: anita81
3 Replies
6. Shell Programming and Scripting
Hi, all
I want to sort a csv file based on timestamp from oldest to newest and save the output as csv file itself. Here is an example of my csv file.
test.csv
SourceFile,DateTimeOriginal
/home/intannf/foto/IMG_0739.JPG,2015:02:17 11:32:21
/home/intannf/foto/IMG_0749.JPG,2015:02:17 11:37:28... (10 Replies)
Discussion started by: refrain
10 Replies
7. Shell Programming and Scripting
Hi,
I have another problem. I want to sort another csv file by the first field.
result.csv
SourceFile,Airspeed,GPSLatitude,GPSLongitude,Temperature,Pressure,Altitude,Roll,Pitch,Yaw
/home/intannf/foto5/2015_0313_090651_219.JPG,0.,-7.77223,110.37310,30.75,996.46,148.75,180.94,182.00,63.92 ... (2 Replies)
Discussion started by: refrain
2 Replies
8. Shell Programming and Scripting
My source file looks like this:
Cust-Number = "101"
Cust-Name="Joe"
Cust-Town="London"
Cust-hobby="tennis"
Cust-purchase="200"
Cust-Number = "102"
Cust-Name="Mary"
Cust-Town="Newyork"
Cust-hobby="reading"
Cust-purchase="125"
Now I want to parse this file (leaving out hobby) and... (10 Replies)
Discussion started by: Balav
10 Replies
9. Shell Programming and Scripting
Hi,
Can someone please let me know as how I can send the below df -h format of a linux system into a CSV format ?
Resource Size GiB Used GiB Avail GiB Use% Cleanable GiB*
---------------- -------- -------- --------- ---- --------------
/data: pre-comp -... (10 Replies)
Discussion started by: new2prog
10 Replies
10. Programming
Hi Experts,
I am writing a python script to grep string from file and display output in csv file as in attached screenshot
https://drive.google.com/file/d/1gfUUdfmQma33tz65NskThYDhkZUGQO0H/view
Input file(result_EPFT_config_device)
Below is the python script i have prepared as of... (1 Reply)
Discussion started by: as7951
1 Replies
LEARN ABOUT DEBIAN
shelltest
SHELLTEST(1) version 1.2.1 SHELLTEST(1)
NAME
shelltestrunner - test command-line programs or arbitrary shell commands
SYNOPSIS
shelltest [options] {testfiles|testdirs}
DESCRIPTION
shelltestrunner tests command-line programs (or arbitrary shell commands). It reads simple declarative tests specifying a command, some
input, and the expected output, and can run them run in parallel, selectively, with a timeout, in color, and/or with differences high-
lighted.
OPTIONS
-a, --all
Show all failure output, even if large
-c, --color
Show colored output if your terminal supports it
-d, --diff
Show failures in diff format
-p, --precise
Show failure output precisely (good for whitespace)
-x STR, --exclude=STR
Exclude test files whose path contains STR
--execdir
Run tests from within the test file's directory. Test commands normally run within your current directory; --execdir makes them run
within the directory where they are defined, instead.
--extension=EXT
Filename suffix of test files (default: .test)
-w, --with=EXECUTABLE
Replace the first word of (unindented) test commands. This option replaces the first word of all test commands with something else,
which can be useful for testing alternate versions of a program. Commands which have been indented by one or more spaces will not
be affected by this option.
--debug
Show debug info, for troubleshooting
--debug-parse
Show test file parsing info and stop
--help-format
Display test format help
-?, --help
Display help message
-V, --version
Print version information
-- TFOPTIONS
Set extra test-framework options like -j/--threads, -t/--select-tests, -o/--timeout, --hide-successes. Use -- --help for a list.
Avoid spaces.
DEFINING TESTS
Test files, typically named tests/*.test, contain one or more tests consisting of:
o a one-line command
o optional standard input (<<<), standard output (>>>) and/or standard error output (>>>2) specifications
o an exit status (>>>=) specification
Test format:
# optional comment
the command to test
<<<
zero or more lines of standard input
>>>
zero or more lines of expected standard output
(or /REGEXP/ added to the previous line)
>>>2
zero or more lines of expected standard error output
(or /REGEXP/ added to the previous line)
>>>= EXITCODE (or /REGEXP/)
o A /REGEXP/ pattern may be used instead of explicit data. In this case a match anywhere in the output allows the test to pass. The regu-
lar expression syntax is regex-tdfa (http://hackage.haskell.org/package/regex-tdfa)'s.
o EXITCODE is a numeric exit status (http://en.wikipedia.org/wiki/Exit_status), eg 0 for a successful exit.
o You can put ! before a /REGEXP/ or EXITCODE to negate the match.
o Comment lines beginning with # may be used between tests.
EXAMPLES
Here's example.test, a file containing two simple tests:
# 1. let's test that echo runs. Numbering your tests can be helpful.
echo
>>>= 0
# 2. and now the cat command. On windows, this one should fail.
cat
<<<
foo
>>>
foo
>>>= 0
Run it with shelltest:
$ shelltest example.test
:t.test:1: [OK]
:t.test:2: [OK]
Test Cases Total
Passed 2 2
Failed 0 0
Total 2 2
AUTHORS
Simon Michael.
shelltestrunner March 18 2012 SHELLTEST(1)