Sponsored Content
Top Forums Shell Programming and Scripting bash replace spaces in list.txt with \ Post 302337179 by danmero on Thursday 23rd of July 2009 02:28:06 PM
Old 07-23-2009
Code:
#!/bin/bash
dir='/some path with spaces'
a=foo;

while read line
do
     scan="scan_command ${line}/$a"
     echo "$scan" # replace to eval 
done <<< "$(ls "${dir}")"

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

If I want to replace txt file with somestring,which way should I go?

If I have txt file named "test.txt" like this 1|2|3|4| 2|3|4|5| 3|4|5|6| 4|5|6|7| I need to replace a "|"(pipe) at the end of the line with ";"(semicolon) it will look like this after replace 1|2|3|4; 2|3|4|5; 3|4|5|6; 4|5|6|7; Which scripts I have to use? Many Thanks (10 Replies)
Discussion started by: guitaroa47
10 Replies

2. UNIX for Dummies Questions & Answers

counting a list of string in a list of txt files

Hi there! I have 150 txt files named chunk1, chunk2, ........., chunk150. I have a second file called string.txt with more than 1000 unique strings, house, dog, cat ... I want to know which command I should use to count how many times each string appears in the 150 files. I have tried... (4 Replies)
Discussion started by: Pep Puigvert
4 Replies

3. Shell Programming and Scripting

Replace spaces

Hi guys, so I have another issue. Can I use sed to replace spaces in a string or variable with %20 I am having trouble with using curl on URL's containing spaces Thanks! (12 Replies)
Discussion started by: tret
12 Replies

4. Solaris

list files .txt and .TXT in one command

Dear experts, In a directory i have both *.TXT and *.txt files. I have a script- for file in `ls *.txt`; do mv $file /tmp/$file How to list both *.txt and*.TXT file in one command so that script will move both .txt or .TXT whatever it find. br//purple (4 Replies)
Discussion started by: thepurple
4 Replies

5. Shell Programming and Scripting

command to list .txt and .TXT file

Hi expersts, in my directory i have *.txt and *.TXT and *.TXT.log, *.txt.log I want list only .txt and .TXT files in one command... how to ?? //purple (1 Reply)
Discussion started by: thepurple
1 Replies

6. Shell Programming and Scripting

Deleting lines that contain spaces in a txt file

I need some help deleting lines in a file that contain spaces. Im sure awk or sed will work but i dont know much about those commands. Any help is appreciated :D (7 Replies)
Discussion started by: r04dw4rri0r
7 Replies

7. Shell Programming and Scripting

Populating a BASH array with a list of files including spaces-in-the-name

For the record, I already tried telling mgmt and the users to disallow spaces in filenames for this script, but it isn't happening for a number of ID10T-error-based reasons. I have simple list of 3 files in a directory that are named like this: bash-3.2$ ls -1 file* file1 file1 part2... (2 Replies)
Discussion started by: ckmehta
2 Replies

8. Windows & DOS: Issues & Discussions

2 Questions: replace text in txt file, add text to end of txt file

so... Lets assume I have a text file. The text file contains multiple "#" symbols. I want to replace all thos "#"s with a STRING using DOS/Batch I want to add a certain TEXT to the end of each line. How can I do this WITHOUT aid of sed, grep or anything linux related ? (1 Reply)
Discussion started by: pasc
1 Replies

9. Shell Programming and Scripting

Bash incert line from 1.txt to 2.txt

i would like to insert a line from 2.txt into 1.txt between " and " or a way of adding to the end of each line " _01_ and have the numbers correspond to the line # 1.txt= foofoo "" _01_ foofoo "" _02_ foofoo "" _03_ foofoo "" _04_ 2.txt= ... (6 Replies)
Discussion started by: klein
6 Replies

10. Shell Programming and Scripting

Linux Commands needed for replacing variable number of spaces with a single , in a txt file

Hi I want to read a text file and replace various number of spaces between each string in to a single "," or any other character .Please let me know the command to do so. My input file is a txt file which is the output of a SQL table extract so it contains so many spaces between each column of the... (2 Replies)
Discussion started by: Hari Prasanth
2 Replies
DPGEN_DFFT(3)						  Alliance - genlib User's Manual					     DPGEN_DFFT(3)

NAME
DPGEN_DFFT - Dynamic Flip-Flop with Scan-Path Macro-Generator SYNOPSIS
#include <genlib.h> void GENLIB_MACRO (DPGEN_DFFT, char *modelname, long flags, long N); DESCRIPTION
Generate a N bits dynamic flip-flop with scan-path named modelname. The two latches of this flip-flop are dynamic, i.e. the data is stored in a capacitor. How it works : o scan when set to '1' enables the scan-path mode. Note that in scan-path mode, the wen signal is not effective. o scin : the input of the scan-path. This terminal is different from i0[0]. The scout is q[N-1] (in the following example this is q[31]). o wen when set to '1' enables the writing of the flip-flop. TERMINAL NAMES 1. scan : scan-path mode (input, 1 bit). 2. scin : scan path in (input, 1 bit). 3. wen : write enable (input, 1 bit). 4. ck : clock signal (input, 1 bit). 5. i0 : data input (N bits). 6. q : output (N bits). 7. vdd : power. 8. vss : ground. EXAMPLE
GENLIB_MACRO(DPGEN_DFFT, "model_dfft_32" , F_BEHAV|F_PLACE , 32 ); GENLIB_LOINS( "model_dfft_32" , "instance1_dfft_32" , "scan" , "scin" , "wen" , "ck" , "i0[31:0]" , "q[31:0]" /* a[31] is "scout". */ , "vdd", "vss", NULL ); SEE ALSO
GENLIB_MACRO(3), genlib(1) ASIM
/LIP6 30 July 2004 DPGEN_DFFT(3)
All times are GMT -4. The time now is 10:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy