What is the correct way to process files


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting What is the correct way to process files
# 1  
Old 09-18-2012
Question What is the correct way to process files

Is there a general way I can use so as to process paths/files from your terminal without the need to backslash things?

Till recently I used to use

Code:
touch "file_here"

but it does not work if file_here contains any of the characters ` and ", I still need to backslash them if I want to make the command work.

Is there any workaround where backslashing characters are not needed?Smilie
# 2  
Old 09-18-2012
try this...

Code:
touch 'file_"name'
touch 'file_`name'

This User Gave Thanks to pamu For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Getting correct port number from process id

Hi All, i am trying to find the Jobss port number(either default port number or any other port number assigned) from the running process id. But it's giving me multiple port numbers when searching with netstat command. Can someone help me in finding the correct port number from the... (3 Replies)
Discussion started by: sravani25
3 Replies

2. Shell Programming and Scripting

How to use perl to generate files with correct filenames?

Hi, I'm trying to use perl to generate files based on sections in a large textfile. This will create one file per section that starts with " ABC_": perl -n -e '/^ABC_/ and open FH, ">output_".$n++; print FH;' largefile.txt However, the output filenames will be on the form output_nn. This... (2 Replies)
Discussion started by: Yagi Uda
2 Replies

3. Shell Programming and Scripting

How to compare two files to get correct result.see example?

Hello, I have two files A and B .A file consist of the words that user will put whereas file B consist of all user's LDAP a/c.I want here that if user don't mention LDAP a/c in comment than it will exit otherwise success. File A.I have a solution that I will modify the file A ...just save the... (9 Replies)
Discussion started by: anuragpgtgerman
9 Replies

4. Solaris

Help with finding correct log files

Lets say i have files like the following format :- R0001.log R0002.log ... ... R00011.log upto R000n.log, there are also a lot of text files with different names now how can i find these files with in a range, i can do "ls R000*.log" and it will show me all the R000*.log files but what... (2 Replies)
Discussion started by: oopsalion
2 Replies

5. Linux

Process start time not showing correct time

Process start time is not showing the correct time: I had started a process on Jun 17th at 23:30:00. Next day morning when I run the command "ps -ef | grep mq", the process is showing the start date of Jun 17th but the start time is 00:16:41 Day/Date is setup correctly on the server. It... (2 Replies)
Discussion started by: hemangjani
2 Replies

6. OS X (Apple)

Open Files for a process

I am having a client/server application which will download files from server. If server has directories, it will create directories/sub directories and then download files. In this process, I observed that number of open files are more than 400 (which is approxmately same as number of dir/subdir... (1 Reply)
Discussion started by: satyam90
1 Replies

7. Shell Programming and Scripting

not able to process files

hi i have a dir contains files i am reading ls $path | while read FILE do grep "a GFT buffer" $path/$FILE ...... ..... done it is able to process the fist file, from secomd onwards it is giving the following error, 2nd file name is "sd_gfts_GFT1_TCPGFT.trc.4" grep:... (1 Reply)
Discussion started by: Satyak
1 Replies

8. UNIX for Dummies Questions & Answers

How do I Process Multiple Files

Hi, First post here. In Mac OSX terminal I need to run a program against multiple files in a directory and append the output to tab separated variable file. I currently type the following to process just one file MBP:/Users/dc1743/Desktop/SFT root# ./myprogram myfile1.plist >>... (1 Reply)
Discussion started by: dc1743
1 Replies

9. Shell Programming and Scripting

How to process only new files

Dear Experts, I desperately need help in some scripting that im totally stuck at. I have some files like this :- -rw-rw---- 1 rtp99 ticgroup 2603099 Jul 17 13:24 cft.CO0102.20070717051933.20070717052451 -rw-rw---- 1 rtp99 ticgroup 3040772 Jul 17 13:24... (5 Replies)
Discussion started by: aismann
5 Replies

10. Shell Programming and Scripting

How to process the files using .tar.gz files in script

Hi, I have some file in /users/xyz directoty with .tar.gz extension. i need to find these files and if found in need to run other commands. I now the command for finding files,but how to put if condition ?please help me Thanks (3 Replies)
Discussion started by: bmkreddy
3 Replies
Login or Register to Ask a Question