Sponsored Content
Top Forums Shell Programming and Scripting Using sed command to replace "|" with ^ for all *.dat files in a folder not working Post 303022995 by Don Cragun on Monday 10th of September 2018 09:36:42 AM
Old 09-10-2018
What operating system and shell are you using?

Note that sed is only defined to work on text files and data files with the filename extension .dat are frequently binary files that do not meet the requirements of text files!

In what way is it "not working"?

Does it produce any diagnostic messages?

Does it just work on the first named file operand?

Is it using your editing command as a filename extension for your backup files instead of as an editing command?

If you're on a system using a BSD-based sed, does the command:
Code:
sed -i '' 's/"|"/^/g' *.dat

come closer to working for you?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Listing only directories in the current working directory using the "ls" command

Hello All, I am trying to list only directories in my current directory using the command "ls -d". But the output only contains the default directory "." and doesn't list the rest of the directories in the working directory. Can anyone explain why this is happening (2 Replies)
Discussion started by: igandu
2 Replies

2. UNIX for Advanced & Expert Users

Running command "md5" on remote host not working.

My question is very strange. I can run ls command on remote host using ssh successfully. but when i try to run /sbin/md5 command on remote host. it doesnt run and get back to me on command prompt. md5 command is exist on remote host. This is what i tried which ran successfully. Query -... (1 Reply)
Discussion started by: ynilesh
1 Replies

3. Shell Programming and Scripting

Sed , Replace a "variable text" inside of a statement

Please Help... I am trying to manipulte the following line Before : <user:Account_Password>002786</user:Account_Password> the password is the "variable", i need to delete / omit the password in the file, (it occurs several thousand times) so the tag line looks like After:... (4 Replies)
Discussion started by: jackn7
4 Replies

4. Shell Programming and Scripting

"find command" to find the files in the current directories but not in the "subdir"

Dear friends, please tell me how to find the files which are existing in the current directory, but it sholud not search in the sub directories.. it is like this, current directory contains file1, file2, file3, dir1, dir2 and dir1 conatins file4, file5 and dir2 contains file6,... (9 Replies)
Discussion started by: swamymns
9 Replies

5. Shell Programming and Scripting

"sed" command is not working in shell script

Hi All, I am not much strong in shell scripting... I am using sed command in my script to find and replace a string....... This is how script looks : ############# #!/usr/bin/ksh CONFIG_FILE=iom_test.txt FIND=`echo "NIS_FTP_SERVER1=123.456.iom.com"` REPLACE=`echo... (2 Replies)
Discussion started by: askumarece
2 Replies

6. Shell Programming and Scripting

cat $como_file | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'

hi All, cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g' Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies

7. UNIX for Advanced & Expert Users

command for recently modified files - "find" command not working

I have three files a.txt , b.txt , c.txt in a directory called my_dir1 .These files were created before two or three months . I have a tar file called my_tar1.tar which contains three files a.txt , b.txt , d.txt . Somebody untarred the my_tar1.tar into my_dir1 directory. So existing two files were... (1 Reply)
Discussion started by: joe.mani
1 Replies

8. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

9. Shell Programming and Scripting

how to use "cut" or "awk" or "sed" to remove a string

logs: "/home/abc/public_html/index.php" "/home/abc/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" how to use "cut" or "awk" or "sed" to get the following result: abc abc xyz xyz xyz (8 Replies)
Discussion started by: timmywong
8 Replies

10. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies
IMPRESSIVE-GETTRANSITIONS(1)				      Debian GNU/Linux manual				      IMPRESSIVE-GETTRANSITIONS(1)

NAME
impressive-gettransitions - Generate Impressive info scripts for LaTeX presentations SYNOPSIS
impressive-gettransitions FILE.tex DESCRIPTION
A simple script to produce a .info file for use with Impressive, using special comments in a LaTeX/Beamer file. FILE.tex is a file to be parsed into .info file. For each /fullpath/blah.tex /fullpath/blah.pdf.info gets produced. SYNTAX
In the LaTeX document, impressive-gettransitions counts the pages to determine the PDF slide number of each one. The simpler page changes are automatically detected, that is: egin{frame} and: pause Other, more elaborated page changes must be noted with a %O comment: item<1-> Foo item<2-> Bar %O The transition to apply can be specified in a %O comment: egin{frame} %O SlideUp OPERATION
When the .info file corresponding to the LaTeX document already exist, impressive-gettransitions does not clear it, but only adds the transitions if finds to it. Thus, if you modified your document in a way that requires to completely replace the transitions, manually clear the PageProps section of the .info file. This can be done by running the following sed command: sed -i -e "/^PageProps = {/,/^}/d" FILE.info SEE ALSO
impressive(1) AUTHOR
impressive-gettransitions (originally gettransitions) has been written by Rob Reid. This manpage has been originally written by Yaroslav Halchenko <debian@onerussian.com>. Debian Project 2012-02-10 IMPRESSIVE-GETTRANSITIONS(1)
All times are GMT -4. The time now is 07:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy