Sponsored Content
Top Forums Shell Programming and Scripting Trick to ignore space in folder name Post 302159719 by pulkit on Friday 18th of January 2008 09:47:01 AM
Old 01-18-2008
Trick to ignore space in folder name

Hello All,

I am getting error while passing a folder name that has space to the cmd line argument.

sh log_delete2.sh "/home/kumarpua/TESTARTIFACTS/atf-chix/ATF-subversion-dev/ssenglogs/A RM"

log_delete2.sh: line 17: cd: /home/kumarpua/TESTARTIFACTS/atf-chix/ATF-subversion-dev/ssenglogs/A: No such file or directory
expr: non-numeric argument

ls: /home/kumarpua/TESTARTIFACTS/atf-chix/ATF-subversion-dev/ssenglogs/A: No such file or directory




Can any one pls suggest how to ignore the space in folder name.....

Regards,
Pulkit
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

space in perticular folder in unix

can any one tell me how to know the free space in perticular folder in unix. size in bytes/MB. thanks in adv. spandu (7 Replies)
Discussion started by: spandu
7 Replies

2. Shell Programming and Scripting

space in folder name

hi my folder name is below FTP_DIR="/DATA/TEMP/PA Mthly and Qrty files" But when i am using the varaible in my ftp shel script i am getting the error '/DATA/TEMP/VA: The system cannot find the path specified please advice. thanks in advance sam (2 Replies)
Discussion started by: sam99
2 Replies

3. UNIX for Dummies Questions & Answers

Creating space in root folder

Hi , I was wondering if anyone knows any great ways for creating space in your Root Folder. My root folder was created with only 247.7MB & I found out that its now full & I was initially wondering how important the "thumbnails Folder" was & if it was alright to delete their contenses as I noticed... (2 Replies)
Discussion started by: Browser
2 Replies

4. Shell Programming and Scripting

find the folder with space in name.

A solaris server with SAMBA share folder. The PC users created many folders with space on it, I want to find them out, but not list its subfolders. For example, I have below folders Copy of ABC/efg/xy sa/Test again/xyt If I use command: find . -type d |grep " " I will list 6 folders, but... (2 Replies)
Discussion started by: rdcwayx
2 Replies

5. UNIX for Dummies Questions & Answers

Copy multiple files with space to folder

Please help , I am in an urgent need, Please help nawk '{for(i=1;i<=NF;i++){printf("%s\n",$i)}}' filename | sed 's/.*com//' | nawk '/pdf/ {printf("F:%s\n",$0)}' | while read line; do mv $line /images/; done the above script works for without spaces but,My path is also having some space... (3 Replies)
Discussion started by: umapearl
3 Replies

6. Shell Programming and Scripting

ignore space regular expression

I just wrote a modsecurity rule that blocks execution on "cat /etc/passwd" from webshell. But when I use cat /etc/passwd it works. Ie when I add space after cat. What I need is a regular expression to ignore additional space than the first single space after cat. (2 Replies)
Discussion started by: anil510
2 Replies

7. Shell Programming and Scripting

AWK FS with ignore space option

Hi, i have in a situation to get the variables which are having a "|" delimiter and each variable may or may not have spaces, so how can i skip the spaces on the string and print the string as it is. For example: line = "|Hello world|Hello|Hi Guys| read x y z <<<$(echo "$line" | awk -F"|"... (5 Replies)
Discussion started by: tprabhaker
5 Replies

8. HP-UX

Which Folder occupies more space?

Hi, What are the correct parameters to list folders size in MBs under a particular directory in HP-UX ? I know and commands but cannot get the output of folder sizes in MBs. (4 Replies)
Discussion started by: mohtashims
4 Replies

9. Shell Programming and Scripting

Ignore Folder in Shell Script ?

Hi, I currently use a script to extract *.deb files located in a Directory called "/var/mobile/Media/Downloads" The Problem is howver I want the script to ignore the folder: "/var/mobile/Media/Downloads/New Debs and Files" (it shall NOT decompile any of the files in that folder. Here is... (2 Replies)
Discussion started by: pasc
2 Replies

10. Shell Programming and Scripting

Move files from Space Folder to other folder

I want to move a folder with spaces from one folder to another. I have two folders like this, 1).RT_032-222 -4444-01/ 2). RT_032-555 -7777-01/ I want to move files from 2 to 1 through shell script.Here I want to assign this like a user defined variable like as Source branch... (2 Replies)
Discussion started by: kannansoft1985
2 Replies
ATF-FORMATS(5)						      BSD File Formats Manual						    ATF-FORMATS(5)

NAME
atf-formats -- machine-parseable data formats used by ATF DESCRIPTION
This manual page describes the multiple data formats used in ATF. These formats affect configuration files, control files and any data that is externalized or internalized by the tools. Data files are always organized as follows: Header1: Value1 ... | head HeaderN: ValueN / mandatory blank line Free-form text contents ... | body ... / A file must always contain a 'Content-Type' header and must always separate that header from the body with a blank line, even if the body is empty. The 'Content-Type' is always of the form: Content-Type: application/X-atf-<subtype>; version="<version>" where 'subtype' indicates the specific file format and 'version' its format version. This header must be the first one of the file. The main purpose of the 'Content-Type' header, aside from determining the format used in the file, is to allow future changes to a given for- mat. Whenever an incompatible change is made, the version is bumped by one. By keeping the header in the first line, future versions may even remove the need for such a header -- e.g. if some format was replaced by XML files, which have their own mandatory header. The rest of this document details the different format types. Format: application/X-atf-atffile, version: 1 Atffiles are logically divided into three sections: o Test programs: the list of test programs that define the test suite described by the Atffile. o Meta-data properties: these define some constant values applicable to all the test programs defined in the file. In some sense they define the properties that describe the test suite. o Configuration variables: defaults for configuration variables that can be overridden through configuration files or the command line. The grammar for Atffiles is the following: DATA ::= ( ( CONF | PROP | TP )? COMMENT? NEWLINE )* EOF CONF ::= 'conf:' WORD EQUAL STRING PROP ::= 'prop:' WORD EQUAL STRING TP ::= TPFILE | TPGLOB TPFILE ::= 'tp: ' STRING TPGLOB ::= 'tp-glob: ' STRING STRING ::= WORD | '"' WORD* '"' The meaning of the constructions above is: CONF Definition of a configuration variable. PROP Definition of a meta-data property. TPFILE Addition of a test program into the test suite. The string is taken literally as the program's name, and this program must exist. TPGLOB Addition of multiple test programs into the test suite. The string is taken as a glob pattern, which may have or not have any matches in the current directory. An example: prop: test-suite = utilities conf: unprivileged-user = nobody tp: t_cp tp: t_mv tp: t_df tp-glob: t_dir_* Format: application/X-atf-config, version: 1 Configuration files are very simple: they only contain a list of variable name/variable value pairs. Their grammar is: DATA ::= ( VAR? COMMENT? NEWLINE )* EOF VAR ::= WORD EQUAL STRING COMMENT ::= HASH WORD* STRING ::= WORD | '"' WORD* '"' An example: # This is the system-wide configuration file for ATF. # The above and this line are comments placed on their own line. var1 = this is a variable value var2 = this is another one # Optional comment at the end. Format: application/X-atf-tps, version: 3 The 'application/X-atf-tps' format multiplexes the standard output, standard error and results output streams from multiple test programs into a single data file. This format is used by atf-run(1) to report the execution of several test programs and is later parsed by atf-report(1) to inform the user of this process. It has the following grammar: DATA ::= INFO* TPS-COUNT TP-STANZA* INFO* EOF INFO ::= 'info' COLON STRING COMMA STRING NEWLINE TPS-COUNT ::= 'tps-count' COLON POSITIVE-NUMBER NEWLINE TP-STANZA ::= TP-START TC-STANZA* TC-END TP-START ::= 'tp-start' COLON TIMESTAMP COMMA STRING COMMA POSITIVE-NUMBER NEWLINE TP-END ::= 'tc-end' COLON TIMESTAMP COMMA STRING (COMMA STRING)? TC-STANZA ::= TC-START (TC-SO | TC-SE)* TC-END TC-START ::= 'tc-start' COLON TIMESTAMP COMMA STRING NEWLINE TC-SO ::= 'tc-so' COLON STRING NEWLINE TC-SE ::= 'tc-se' COLON STRING NEWLINE TC-END ::= 'tc-end' COLON TIMESTAMP COMMA STRING COMMA TCR NEWLINE TCR ::= 'passed' | ('failed' | 'skipped') COMMA STRING TIMESTAMP ::= [0-9]+.[0-9]+ The meaning of the constructions above is: TPS-COUNT Indicates the number of test programs that will be executed. There will be this exact amount of 'TP-STANZA' constructions fol- lowing it. TP-START Indicates the beginning of a test program. This includes the program's name and the amount of test cases that will follow. TP-END Indicates the completion of a test program. This is followed by the program's name and, if the program ended prematurely, an error message indicating the reason of its failure. A successful execution of a test program (regardless of the status of its test cases) must not be accompanied by any reason. TC-START Indicates the beginning of a test case. This is accompanied by the test case's name. TC-SO Contains a text line sent to the standard output stream during the execution of the test case. Leading and trailing space is preserved. TC-SE Contains a text line sent to the standard error stream during the execution of the test case. Leading and trailing space is preserved. TC-END Indicates the completion of a test case. This is accompanied by the test case's name, its result and the reason associated with this result (if applicable). An example: tps-count: 2 tp-start: calculator, 1324318951.838923, 2 tc-start: add, 1324318951.839101 tc-end: add, 1324318951.839500, passed tc-start: subtract, 1324318951.840001 tc-so: 3-2 expected to return 1 but got 0 tc-end: subtract, 1324318952.000123, failed, Calculated an unexpected value tp-end: calculator, 1324318952.002301 tp-start: files, 1, 1324318952.502348 tc-start: copy, 1324318952.508291 tc-se: could not find the cp(1) utility tc-end: copy, 1324318953.203145, skipped tp-end: files, 1324318953.203800 SEE ALSO
atf(7) BSD
December 20, 2011 BSD
All times are GMT -4. The time now is 05:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy