![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| String search - Command to find second occurance | saurabhsinha23 | UNIX for Dummies Questions & Answers | 5 | 12-06-2007 08:03 PM |
| Problems with find command | lodey | UNIX for Dummies Questions & Answers | 4 | 10-27-2007 07:47 AM |
| Unix find command to print directory and search string | princein | UNIX for Dummies Questions & Answers | 4 | 03-06-2007 08:46 AM |
| Looking for command(s)/ script to find a text string within a file | wrwelden | Shell Programming and Scripting | 5 | 11-23-2006 12:53 AM |
| ctrl-c: not escaping command | dangral | UNIX for Dummies Questions & Answers | 3 | 06-23-2004 04:36 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
find: problems escaping printf-command string
Hi Folks!
Can you help me with this find -printf command. I seem to be unable to execute the printf-command from my shell script. I'm confused: My shell script snippet looks like this: Code:
#!/bin/sh
..
COMMAND="find ./* -printf '%p %m %s %u %g \n'"
echo "Command: ${COMMAND}"
${COMMAND} > ${ARCHIVE_DIR}/${CURRENT_FILE}
Code:
Command: find ./* -printf '%p %m %s %u %g \n' find: paths must precede expression Look forward to your replies Grahamb Using Fedora2.54 with bash; and #!/bin/sh for shell execution |
|
||||
|
Hi You Guys!
I'm sure most of you have an answer to this one. I'm trying to do a work around on the problem above, but get held up elsewhere!!!!! So can't avoid this problem.Here's my next stopper: Code:
COMMAND="ls -la --full-time `find ./* -type f` "
${COMMAND} | awk '''{ print '$NF' '$0' }''' >> ${ARCHIVE_DIR}/${TMP_FILE}
Code:
+ awk '{ print /usr/share/scripts/security_check.sh }'
When I put \$NF inside the awk-brackets the "\" gets sent to the command line, eg: Code:
+ awk '{ print \$NF \$0 }'
Can u help? Any ideas? Any links to help me? regards GrahamB |
| Sponsored Links | ||
|
|