[英]how to print the column of a file in unix recursively?
I want to print the columns of a file in unix to a temp file.Below is the code that i have wrote but its not giving proper output. 我想将unix文件的列打印到临时文件。以下是我编写的代码,但没有给出正确的输出。
#!/bin/bash
CURRENT_DATE=`date +'%d%m%Y'`
Temp_Path=/appinfprd/bi/Scripts/IRP/New_Vendors/
IRP_PROJECT/SXM_SFTP/*/INBOUND -type f head -1|xargs -0 ls -al > "$Temp_Path/Column_$CURRENT_DATE.txt"
Solution with find command only 仅使用find命令的解决方案
find \
IRP_PROJECT/SXM_SFTP/*/INBOUND \
-type f \
-exec head -1 {} \; \
> "$Temp_Path/Column_$CURRENT_DATE.txt"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.