Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Syntax error near unexpected token 'do' Post 303010576 by MadeInGermany on Wednesday 3rd of January 2018 12:33:26 PM
Old 01-03-2018
And command arguments should be quoted.
And a test for file is appropriate.
Code:
for FN in /X5/WORK/BGH/INV/REG/pdf/SEND/BGH*/1/*.fo; do test -f "$FN" && gzip "$FN"; done

This User Gave Thanks to MadeInGermany For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sh syntax error unexpected token done

I'm getting the following error: line 21: syntax error near unexpected token `done` line 21: `done` and I haven't been able to figure out why. Here is my code #!/bin/sh if ; then echo 'Usage: rename getexp/replStr ' exit 0 fi arg = $1 shift while ; do (5 Replies)
Discussion started by: NullPointer
5 Replies

2. UNIX for Advanced & Expert Users

syntax error near unexpected token '{

Hi, I am running the following script through cygwin and getting below mentioned error. ******************************************* #!/bin/sh # constants WORK_DIR="deploy" INFOFILE="deploy.info" INTROFILE="Intro.sh" CMGMT_PKG="com.kintana.cmgmt.deploy" DEPLOY_PREFIX="mitg" ... (2 Replies)
Discussion started by: MandyR
2 Replies

3. Shell Programming and Scripting

syntax error near unexpected token `='

Hi all, This is a script which converts hex to bin. However am finding an error while executing syntax error near unexpected token `=' `($hexfile, $binfile) = @ARGV;' I am running using ./fil.pl <hexfile> <binfile> ################################################### # # this script... (3 Replies)
Discussion started by: jaango123
3 Replies

4. Shell Programming and Scripting

Syntax error near unexpected token `('

What do I do here? #!/bin/bash payload=-1 AND 1=IF(21,BENCHMARK(5000000,MD5(CHAR(115,113,108,109,97,112))),0)# hash=`echo -n $payload md5sum tr -d 'n' sed 'ss-sg' md5sum tr -d 'n' sed 'ss-sg'` curl --data cs2=chronopay&cs1=$payload&cs3=$hash&transaction_type=rebill... (2 Replies)
Discussion started by: iiiiiiiiiii
2 Replies

5. Shell Programming and Scripting

Syntax error near unexpected token `else'

Hi, I am trying to read the session log through script. But it keeps showing me some error near. I have tried everything. Even tried converting the script using sed command to remove the hidden characters(\r).But nothing seems to be working.Below is the script : #!/bin/bash cd... (6 Replies)
Discussion started by: Aryan12345
6 Replies

6. Shell Programming and Scripting

Syntax error near unexpected token '('

I tried to execute the code but I got this error ./Array.c: line 9: syntax error near unexpected token '(' ./Array.c: line 9: ' nvals = get_data(a,MAXARRAY);' and #include<stdio.h> #define MAXARRAY 1000 main() { int a, nvals; nvals =... (7 Replies)
Discussion started by: sgradywhite
7 Replies

7. Shell Programming and Scripting

Syntax error near unexpected token

Hi all, I have a simple script that doesn't work somehow. I can't seem to be spotting the cause of the malfunction. count=$((1)) for item in `cat test1.txt` printf %s `sed -n $((count))p test2.txt` > test3.txt count=$((count+1)) do something done I get ; ./why.sh: line 3:... (14 Replies)
Discussion started by: y33t
14 Replies

8. How to Post in the The UNIX and Linux Forums

Syntax error near unexpected token `('

I have 2 files like a.txt and b.txt and the content is as below cat a.txt 810750125 117780 /BSCSQAT4A/bscsqat4a/lib/jar/wclt_common.jar 1803152428 13300 /BSCSQAT4A/bscsqat4a/lib/jar/WFMSSupportTool.jar 2663502779 67049 /BSCSQAT4A/bscsqat4a/lib/jar/wma.jar 687942896 665272... (1 Reply)
Discussion started by: ranabhavish
1 Replies

9. UNIX for Beginners Questions & Answers

Syntax error near unexpected token

Dears, While executing the below script im getting the error at line 30. Please let me know what changes to be done to fix this. test.sh: line 30: syntax error near unexpected token `done' test.sh: line 30: ` done ' #!/bin/sh # Rev. PA1 # author: eillops # date: 26-04-2018 # #... (1 Reply)
Discussion started by: Kamesh G
1 Replies

10. Ubuntu

Syntax error near unexpected token `('

detect_mouse_mvt.sh /home/andy/bin/detect_mouse_mvt.sh: line 4: syntax error near unexpected token `(' /home/andy/bin/detect_mouse_mvt.sh: line 4: `fh = file('/dev/input/mice')' #!/bin/bash # # fh = file('/dev/input/mice') while True: fh.read(3) print 'Mouse... (15 Replies)
Discussion started by: drew77
15 Replies
ipptool(1)							    Apple Inc.								ipptool(1)

NAME
ipptool - perform internet printing protocol requests SYNOPSIS
ipptool [ --help ] [ --stop-after-include-error ] [ --version ] [ -4 ] [ -6 ] [ -C ] [ -E ] [ -I ] [ -L ] [ -S ] [ -T seconds ] [ -V ver- sion ] [ -X ] [ -c ] [ -d name=value ] [ -f filename ] [ -i seconds ] [ -n repeat-count ] [ -q ] [ -t ] [ -v ] URI filename [ ... filenameN ] DESCRIPTION
ipptool sends IPP requests to the specified URI and tests and/or displays the results. Each named file defines one or more requests, including the expected response status, attributes, and values. Output is either a plain text, formatted text, CSV, or XML report on the standard output, with a non-zero exit status indicating that one or more tests have failed. The file format is described in ipptoolfile(5). OPTIONS
The following options are recognized by ipptool: --help Shows program help. --stop-after-include-error Tells ipptool to stop if an error occurs in an included file. Normally ipptool will continue with subsequent tests after the INCLUDE directive. --version Shows the version of ipptool being used. -4 Specifies that ipptool must connect to the printer or server using IPv4. -6 Specifies that ipptool must connect to the printer or server using IPv6. -C Specifies that requests should be sent using the HTTP/1.1 "Transfer-Encoding: chunked" header, which is required for conformance by all versions of IPP. The default is to use "Transfer-Encoding: chunked" for requests with attached files and "Content-Length:" for requests without attached files. -E Forces TLS encryption when connecting to the server using the HTTP "Upgrade" header. -I Specifies that ipptool will continue past errors. -L Specifies that requests should be sent using the HTTP/1.0 "Content-Length:" header, which is required for conformance by all versions of IPP. The default is to use "Transfer-Encoding: chunked" for requests with attached files and "Content-Length:" for requests without attached files. -S Forces (dedicated) SSL encryption when connecting to the server. -T seconds Specifies a timeout for IPP requests in seconds. -V version Specifies the default IPP version to use: 1.0, 1.1, 2.0, 2.1, or 2.2. If not specified, version 1.1 is used. -X Specifies that XML (Apple plist) output is desired instead of the plain text report. This option is incompatible with the -i (inter- val) and -n (repeat-count) options. -c Specifies that CSV (comma-separated values) output is desired instead of the plain text output. -d name=value Defines the named variable. -f filename Defines the default request filename for tests. -i seconds Specifies that the (last) file should be repeated at the specified interval. This option is incompatible with the -X (XML plist out- put) option. -l Specifies that plain text output is desired. -n repeat-count Specifies that the (last) file should be repeated the specified number of times. This option is incompatible with the -X (XML plist output) option. -t Specifies that CUPS test report output is desired instead of the plain text output. -v Specifies that all request and response attributes should be output in CUPS test mode (-t). This is the default for XML output. EXIT CODE
The ipptool program returns 0 if all tests were sucessful and 1 otherwise. COMPATIBILITY
The ipptool program is unique to CUPS. EXAMPLES
Get a list of completed jobs for "myprinter": ipptool ipp://localhost/printers/myprinter get-completed-jobs.test Send email notifications to "user@example.com" when "myprinter" changes: ipptool -d recipient=mailto:user@example.com ipp://localhost/printers/myprinter create-printer-subscription.test STANDARD FILES
The following standard files are available: color.jpg create-printer-subscription.test document-a4.pdf document-a4.ps document-letter.pdf document-letter.ps get-completed-jobs.test get-jobs.test get-notifications.test get-printer-attributes.test get-subscriptions.test gray.jpg ipp-1.1.test ipp-2.0.test ipp-2.1.test ipp-2.2.test ipp-everywhere.test onepage-a4.pdf onepage-a4.ps onepage-letter.pdf onepage-letter.ps print-job.test print-job-deflate.test print-job-gzip.test testfile.jpg testfile.pcl testfile.pdf testfile.ps testfile.txt validate-job.test SEE ALSO
ipptoolfile(5), http://localhost:631/help COPYRIGHT
Copyright 2007-2013 by Apple Inc. 13 May 2013 CUPS ipptool(1)
All times are GMT -4. The time now is 09:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy