Sponsored Content
Full Discussion: Space in a arg
Top Forums UNIX for Dummies Questions & Answers Space in a arg Post 302368009 by vino_hymi on Wednesday 4th of November 2009 03:11:18 AM
Old 11-04-2009
I need a command to ignore the white spaces when reading a file.
Which contains contents like below.

Where i will be reading each line and passing as a argument to another process.

Due to this space its throwing multiple arguments error.


Code:
products/100% Haddock Fillets  500G-small.gif
products/100% Haddock Fillets  500G.gif
products/2 Hot and Spicy  Grills 200G -small.gif
products/2 Hot and Spicy  Grills 200G.gif
products/2 Original  Fillet Burgers 180G -small.gif
products/2 Original  Fillet Burgers 180G.gif

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

arg list too long

I do ls -l ABC*, I get arg list too long message. This will not happen if ABC* has small no of files I believe 4000 files is limit. Any way of avoiding this. I even tried like this for i in `ls -l ABC*` do echo $i done Same problem. Any solution would be great. I am on HP-UX... (5 Replies)
Discussion started by: vingupta
5 Replies

2. UNIX for Advanced & Expert Users

arg list too long

Does anyone have a solution for arg list too long error. I have got this from the web but I fail to make any sense out of it Thanks enc (8 Replies)
Discussion started by: encrypted
8 Replies

3. AIX

file system space arg !!! and confused

Aix 5.2 on a P510 RS6000 My /usr filesystem is sized at 3.8 gb. Check me if I'm wrong here but this should be enough space for /usr? When I installed the o/s I just followed the defaults, didn't add any 3rd party apps, least that I know of. My problem is that it's running at 90% capacity. ... (2 Replies)
Discussion started by: Westy564
2 Replies

4. Shell Programming and Scripting

arg list too long

Hi, Help. I have a file that contains a list of users in a file. I want to cat the content of the file and feed it into sed to a preformated report. The error I got is "ksh: /usr/bin/sed: arg list too long" My method below. A=`cat FILE1.txt` B=`echo $A` sed "s#USERLIST#$B#" FILE2 >... (2 Replies)
Discussion started by: Zenwork
2 Replies

5. Programming

warning: int format,pid_t arg (arg 2)

I try following code under Solaris10,like follows: int glob = 6; int main(void) { int var; pid_t pid; var = 88; printf("before vfork\n"); if ((pid = vfork()) < 0) { err_sys("vfork error"); } else if (pid == 0) { glob++; var++; _exit(0); } ... (1 Reply)
Discussion started by: konvalo
1 Replies

6. UNIX for Dummies Questions & Answers

Arg list too long

Hello All, I am trying to find a file name with .sh exention from a list of .dat files inside a directory. find /app/folder1/* -name '*.dat'| xargs grep '.sh' ksh: /usr/local/bin/find: arg list too long Please help me finding the command. Thanks (3 Replies)
Discussion started by: tkhan9
3 Replies

7. Shell Programming and Scripting

Copy from/to file, if arg 'ok'

Hello, I've just started with shell scripting, and I need som assistance! Basicly what I want to do is copy names from one file to another, when running the scrip the user should be asked about the status of these names. Let me demonstrate: file: Name: John, Gender: male Name: Jane,... (6 Replies)
Discussion started by: klskl
6 Replies

8. Shell Programming and Scripting

Bash script too many arg's

I have a simple bash script on RHEL that works fine when there is one file but when it finds multiple files of same condition I get too many args error. for i in * do if ;then echo "no files to move" exit 0 fi if ; then ... (10 Replies)
Discussion started by: jcalisi
10 Replies

9. Shell Programming and Scripting

Execute arg with ssh

Hello, I am trying to execute remote script with ssh : ssh -o ConnectTimeout=10 -o PasswordAuthentication=no -o NumberOfPasswordPrompts=0 -o StrictHostKeyChecking=no root@host '/arbo/script -t' My script is well executed, but my option '-t' is never loaded, how can you explain that ? (2 Replies)
Discussion started by: cterra
2 Replies
SDIFF(1)							   User Commands							  SDIFF(1)

NAME
sdiff - side-by-side merge of file differences SYNOPSIS
sdiff [OPTION]... FILE1 FILE2 DESCRIPTION
Side-by-side merge of differences between FILE1 and FILE2. Mandatory arguments to long options are mandatory for short options too. -o, --output=FILE operate interactively, sending output to FILE -i, --ignore-case consider upper- and lower-case to be the same -E, --ignore-tab-expansion ignore changes due to tab expansion -Z, --ignore-trailing-space ignore white space at line end -b, --ignore-space-change ignore changes in the amount of white space -W, --ignore-all-space ignore all white space -B, --ignore-blank-lines ignore changes whose lines are all blank -I, --ignore-matching-lines=RE ignore changes all whose lines match RE --strip-trailing-cr strip trailing carriage return on input -a, --text treat all files as text -w, --width=NUM output at most NUM (default 130) print columns -l, --left-column output only the left column of common lines -s, --suppress-common-lines do not output common lines -t, --expand-tabs expand tabs to spaces in output --tabsize=NUM tab stops at every NUM (default 8) print columns -d, --minimal try hard to find a smaller set of changes -H, --speed-large-files assume large files, many scattered small changes --diff-program=PROGRAM use PROGRAM to compare files --help display this help and exit -v, --version output version information and exit If a FILE is '-', read standard input. Exit status is 0 if inputs are the same, 1 if different, 2 if trouble. AUTHOR
Written by Thomas Lord. REPORTING BUGS
Report bugs to: bug-diffutils@gnu.org GNU diffutils home page: <http://www.gnu.org/software/diffutils/> General help using GNU software: <http://www.gnu.org/gethelp/> COPYRIGHT
Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
cmp(1), diff(1), diff3(1) The full documentation for sdiff is maintained as a Texinfo manual. If the info and sdiff programs are properly installed at your site, the command info sdiff should give you access to the complete manual. diffutils 3.6 May 2017 SDIFF(1)
All times are GMT -4. The time now is 11:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy